Re: Logical decoding on standby - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Logical decoding on standby
Date
Msg-id CAMsr+YEsrUf0sq9RtK7cy2wM7+pUQQ22LzPU-FzVOBL7PROwhg@mail.gmail.com
Whole thread Raw
In response to Re: Logical decoding on standby  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: Logical decoding on standby  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 27 March 2017 at 14:08, Craig Ringer <craig@2ndquadrant.com> wrote:

> So this patch makes ReplicationSlotAcquire check that the slot
> database matches the current database and refuse to acquire the slot
> if it does not.

New patch attached that drops above requirement, so slots can still be
dropped from any DB.

This introduces a narrow race window where DROP DATABASE may ERROR if
somebody connects to a different database and runs a
pg_drop_replication_slot(...) for one of the slots being dropped by
DROP DATABASE after we check for active slots but before we've dropped
the slot. But it's hard to hit and it's pretty harmless; the worst
possible result is dropping one or more of the slots before we ERROR
out of the DROP. But you clearly didn't want them anyway, since you
were dropping the DB and dropping some slots at the same time.

I think this one's ready to go.

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Monitoring roles patch
Next
From: Simon Riggs
Date:
Subject: Re: increasing the default WAL segment size