summaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/option.c
diff options
context:
space:
mode:
authorThomas Munro2020-11-02 06:50:45 +0000
committerThomas Munro2020-11-02 12:19:50 +0000
commit257836a75585934cc05ed7a80bccf8190d41e056 (patch)
tree5f3eb018d0f0609063669b81136036b79bf8f948 /src/bin/pg_upgrade/option.c
parentcd6f479e79f3a33ef7a919c6b6c0c498c790f154 (diff)
Track collation versions for indexes.
Record the current version of dependent collations in pg_depend when creating or rebuilding an index. When accessing the index later, warn that the index may be corrupted if the current version doesn't match. Thanks to Douglas Doole, Peter Eisentraut, Christoph Berg, Laurenz Albe, Michael Paquier, Robert Haas, Tom Lane and others for very helpful discussion. Author: Thomas Munro <[email protected]> Author: Julien Rouhaud <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> (earlier versions) Discussion: https://postgr.es/m/CAEepm%3D0uEQCpfq_%2BLYFBdArCe4Ot98t1aR4eYiYTe%3DyavQygiQ%40mail.gmail.com
Diffstat (limited to 'src/bin/pg_upgrade/option.c')
-rw-r--r--src/bin/pg_upgrade/option.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/pg_upgrade/option.c b/src/bin/pg_upgrade/option.c
index aca1ee8b48d..548d648e8c4 100644
--- a/src/bin/pg_upgrade/option.c
+++ b/src/bin/pg_upgrade/option.c
@@ -56,6 +56,7 @@ parseCommandLine(int argc, char *argv[])
{"socketdir", required_argument, NULL, 's'},
{"verbose", no_argument, NULL, 'v'},
{"clone", no_argument, NULL, 1},
+ {"index-collation-versions-unknown", no_argument, NULL, 2},
{NULL, 0, NULL, 0}
};
@@ -203,6 +204,10 @@ parseCommandLine(int argc, char *argv[])
user_opts.transfer_mode = TRANSFER_MODE_CLONE;
break;
+ case 2:
+ user_opts.ind_coll_unknown = true;
+ break;
+
default:
fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
os_info.progname);
@@ -307,6 +312,8 @@ usage(void)
printf(_(" -v, --verbose enable verbose internal logging\n"));
printf(_(" -V, --version display version information, then exit\n"));
printf(_(" --clone clone instead of copying files to new cluster\n"));
+ printf(_(" --index-collation-versions-unknown\n"));
+ printf(_(" mark text indexes as needing to be rebuilt\n"));
printf(_(" -?, --help show this help, then exit\n"));
printf(_("\n"
"Before running pg_upgrade you must:\n"