summaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/server.c
diff options
context:
space:
mode:
authorBruce Momjian2020-12-25 15:19:44 +0000
committerBruce Momjian2020-12-25 15:19:44 +0000
commit978f869b992f9fca343e99d6fdb71073c76e869a (patch)
treeb8020240551aa16da5b4fc9fbf96710de2d667e4 /src/bin/pg_upgrade/server.c
parent5c31afc49d0b62b357218b6f8b01782509ef8acd (diff)
Add key management system
This adds a key management system that stores (currently) two data encryption keys of length 128, 192, or 256 bits. The data keys are AES256 encrypted using a key encryption key, and validated via GCM cipher mode. A command to obtain the key encryption key must be specified at initdb time, and will be run at every database server start. New parameters allow a file descriptor open to the terminal to be passed. pg_upgrade support has also been added. Discussion: https://postgr.es/m/CA+fd4k7q5o6Nc_AaX6BcYM9yqTbC6_pnH-6nSD=54Zp6NBQTCQ@mail.gmail.com Discussion: https://postgr.es/m/[email protected] Author: Masahiko Sawada, me, Stephen Frost
Diffstat (limited to 'src/bin/pg_upgrade/server.c')
-rw-r--r--src/bin/pg_upgrade/server.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/pg_upgrade/server.c b/src/bin/pg_upgrade/server.c
index 713509f5406..9208ad0d8a3 100644
--- a/src/bin/pg_upgrade/server.c
+++ b/src/bin/pg_upgrade/server.c
@@ -244,8 +244,9 @@ start_postmaster(ClusterInfo *cluster, bool report_and_exit_on_error)
* vacuumdb --freeze actually freezes the tuples.
*/
snprintf(cmd, sizeof(cmd),
- "\"%s/pg_ctl\" -w -l \"%s\" -D \"%s\" -o \"-p %d%s%s %s%s\" start",
- cluster->bindir, SERVER_LOG_FILE, cluster->pgconfig, cluster->port,
+ "\"%s/pg_ctl\" -w%s -l \"%s\" -D \"%s\" -o \"-p %d%s%s %s%s\" start",
+ cluster->bindir, user_opts.pass_terminal_fd ? " -R" : "",
+ SERVER_LOG_FILE, cluster->pgconfig, cluster->port,
(cluster->controldata.cat_ver >=
BINARY_UPGRADE_SERVER_FLAG_CAT_VER) ? " -b" :
" -c autovacuum=off -c autovacuum_freeze_max_age=2000000000",