From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix resource management bug with replication=database.
Date: Sat, 04 Apr 2020 02:33:44 +0000
Message-ID: <E1jKYcy-0007Yp-5h@gemulon.postgresql.org> (raw)
Fix resource management bug with replication=database.
Commit 0d8c9c1210c44b36ec2efcb223a1dfbe897a3661 allowed BASE_BACKUP to
acquire a ResourceOwner without a transaction so that the backup
manifest functionality could use a BufFile, but it overlooked the fact
that when a walsender is used with replication=database, it might have
a transaction in progress, because in that mode, SQL and replication
commands can be mixed. Try to fix things up so that the two cleanup
mechanisms don't conflict.
Per buildfarm member serinus, which triggered the problem when
CREATE_REPLICATION_SLOT failed from inside a transaction. It passed
on the subsequent run, so evidently the failure doesn't happen every
time.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3e0d80fd8d3dd4f999e0d3aa3e591f480d8ad1fd
Modified Files
--------------
src/backend/replication/walsender.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: rhaas@postgresql.org
Subject: Re: pgsql: Fix resource management bug with replication=database.
In-Reply-To: <E1jKYcy-0007Yp-5h@gemulon.postgresql.org>
References: <E1jKYcy-0007Yp-5h@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox