Re: pg_basebackup -F plain -R overwrites postgresql.auto.conf

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_basebackup -F plain -R overwrites postgresql.auto.conf
Date: 2020-02-10 08:23:49
Message-ID: 16781061581323029@iva1-398527a32f9a.qloud-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

Seems bug was introduced in caba97a9d9f4d4fa2531985fd12d3cd823da06f3 - in HEAD only

In REL_12_STABLE we have:

bool is_recovery_guc_supported = true;

if (PQserverVersion(conn) < MINIMUM_VERSION_FOR_RECOVERY_GUC)
is_recovery_guc_supported = false;

snprintf(filename, MAXPGPATH, "%s/%s", basedir,
is_recovery_guc_supported ? "postgresql.auto.conf" : "recovery.conf");

cf = fopen(filename, is_recovery_guc_supported ? "a" : "w");

It looks correct: append mode for postgresql.auto.conf

In HEAD version is_recovery_guc_supported variable was replaced to inversed use_recovery_conf without change fopen mode.

regards, Sergei

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2020-02-10 08:41:40 Re: pg_basebackup -F plain -R overwrites postgresql.auto.conf
Previous Message Amit Kapila 2020-02-10 08:22:13 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions