Re: replication slot restart_lsn initialization

From: Andres Freund <andres(at)anarazel(dot)de>
To: Gurjeet Singh <gurjeet(at)singh(dot)im>
Cc: "Duran, Danilo" <danilod(at)amazon(dot)com>, "robertmhaas(at)gmail(dot)com" <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: replication slot restart_lsn initialization
Date: 2015-07-07 16:46:19
Message-ID: 20150707164619.GF10242@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-07-07 09:42:54 -0700, Gurjeet Singh wrote:
> On a side note, I see that the pg_create_*_replication_slot() functions do
> not behave transactionally; that is, rolling back a transaction does not
> undo the slot creation.

It can't, because otherwise you couldn't run them on a standby.

> Should we prevent these, and corresponding drop functions, from being
> called inside an explicit transaction? PreventTransactionChain() is
> geared towards serving just the utility commands. Do we protect
> against calling such functions in a transaction block, or from user
> functions? How?

We discussed that when slots where introduced. There seems little
benefit in doing so, and it'll make some legitimate use cases harder.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-07-07 16:50:56 Re: Repeated pg_upgrade buildfarm failures on binturon
Previous Message Bruce Momjian 2015-07-07 16:44:29 Re: Missing latex-longtable value