pgsql: Properly remove ephemeral replication slots after a crash restar

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Properly remove ephemeral replication slots after a crash restar
Date: 2014-07-24 12:45:05
Message-ID: E1XAIOP-0006sY-0U@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Properly remove ephemeral replication slots after a crash restart.

Ephemeral slots - slots that shouldn't survive database restarts -
weren't properly cleaned up after a immediate/crash restart. They were
ignored in the sense that they weren't restored into memory and thus
didn't cause unwanted resource retention; but they prevented a new
slot with the same name from being created.

Now ephemeral slots are fully removed during startup.

Backpatch to 9.4 where replication slots where added.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/fece13d7477720bcbf02af795bed695c54d1250c

Modified Files
--------------
src/backend/replication/slot.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2014-07-24 13:18:48 pgsql: Fix checkpointer crash in EXEC_BACKEND builds.
Previous Message Andres Freund 2014-07-24 12:45:02 pgsql: Properly remove ephemeral replication slots after a crash restar