Re: replication slot restart_lsn initialization - Mailing list pgsql-hackers

From Andres Freund
Subject Re: replication slot restart_lsn initialization
Date
Msg-id 20150811232001.GB8470@awork2.anarazel.de
Whole thread Raw
In response to Re: replication slot restart_lsn initialization  (Gurjeet Singh <gurjeet@singh.im>)
Responses Re: replication slot restart_lsn initialization  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On 2015-08-11 15:59:59 -0700, Gurjeet Singh wrote:
> In your version, I don't see a comment that refers to the fact that it
> works on the currently active (global variable) slot.

Hm?

/** Reserve WAL for the currently active slot.** Compute and set restart_lsn in a manner that's appropriate for the
typeof* the slot and concurrency safe.*/
 
> > I moved
> > values[0] = NameGetDatum(&MyReplicationSlot->data.name);
> > nulls[0] = false;
> > to outside the conditional block, there seems no reason to have it in
> > there?
> >
> 
> The assignment to values[0] is being done twice. We can do away with the
> one in the else part of the if condition.

Ugh, that's a mistake.

> [1]: I altered you to it in a personal email, but probably it fell through
> the cracks.

I usually just check the lists for newer patch versions, sorry...

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Gurjeet Singh
Date:
Subject: Re: replication slot restart_lsn initialization
Next
From: Tom Lane
Date:
Subject: Re: GIN pending clean up is not interruptable