aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2011-04-25 12:00:21 -0400
committerBruce Momjian <bruce@momjian.us>2011-04-25 12:00:21 -0400
commit76dd09bbec893c02376e3440a6a86a3b994d804c (patch)
tree721a384f3511d2dc72642afeea48629019a15bb3 /src/backend/tcop/postgres.c
parent02e6a115cc6149551527a45545fd1ef8d37e6aa0 (diff)
downloadpostgresql-76dd09bbec893c02376e3440a6a86a3b994d804c.tar.gz
postgresql-76dd09bbec893c02376e3440a6a86a3b994d804c.zip
Add postmaster/postgres undocumented -b option for binary upgrades.
This option turns off autovacuum, prevents non-super-user connections, and enables oid setting hooks in the backend. The code continues to use the old autoavacuum disable settings for servers with earlier catalog versions. This includes a catalog version bump to identify servers that support the -b option.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 59b7666c109..a07661f02ab 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -3238,7 +3238,7 @@ process_postgres_switches(int argc, char *argv[], GucContext ctx)
* postmaster/postmaster.c (the option sets should not conflict) and with
* the common help() function in main/main.c.
*/
- while ((flag = getopt(argc, argv, "A:B:c:D:d:EeFf:h:ijk:lN:nOo:Pp:r:S:sTt:v:W:-:")) != -1)
+ while ((flag = getopt(argc, argv, "A:B:bc:D:d:EeFf:h:ijk:lN:nOo:Pp:r:S:sTt:v:W:-:")) != -1)
{
switch (flag)
{
@@ -3250,6 +3250,11 @@ process_postgres_switches(int argc, char *argv[], GucContext ctx)
SetConfigOption("shared_buffers", optarg, ctx, gucsource);
break;
+ case 'b':
+ /* Undocumented flag used for binary upgrades */
+ IsBinaryUpgrade = true;
+ break;
+
case 'D':
if (secure)
userDoption = strdup(optarg);