Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit be6221e

Browse filesBrowse files
committed
Fix bug in pg_basebackup -F plain -R.
Commit caba97a changed pg_basebackup -F plain -R so that it overwrote postgresql.auto.conf in the backup, with new connection setting. This could cause the existing postgresql.auto.conf settings in the server to get lost unexpectedly. This is a bug. This commit fixes the bug by making pg_basebackup -F plain -R append the connection setting into postgresql.auto.conf in the backup. Author: Fujii Masao Reviewed-by: Sergei Kornilov Discussion: https://postgr.es/m/250dcf2a-94e7-c05e-824a-73cfb38a48a4@oss.nttdata.com
1 parent e49d5eb commit be6221e
Copy full SHA for be6221e

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/fe_utils/recovery_gen.c

Copy file name to clipboardExpand all lines: src/fe_utils/recovery_gen.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ WriteRecoveryConfig(PGconn *pgconn, char *target_dir, PQExpBuffer contents)
128128
snprintf(filename, MAXPGPATH, "%s/%s", target_dir,
129129
use_recovery_conf ? "recovery.conf" : "postgresql.auto.conf");
130130

131-
cf = fopen(filename, use_recovery_conf ? "a" : "w");
131+
cf = fopen(filename, use_recovery_conf ? "w" : "a");
132132
if (cf == NULL)
133133
{
134134
pg_log_error("could not open file \"%s\": %m", filename);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.