From b5ed1376c61b341939ef3f54996a5c5af3408a06 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 9 Jan 2013 16:57:32 +0100 Subject: [PATCH] Don't attempt to write recovery.conf when -R is not specified Fixes segmentation fault during regular use. Fujii Masao --- src/bin/pg_basebackup/pg_basebackup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 661cf246a0..ffc882616f 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -1084,7 +1084,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) if (copybuf != NULL) PQfreemem(copybuf); - if (basetablespace) + if (basetablespace && writerecoveryconf) WriteRecoveryConf(); } -- 2.30.2