Re: pg_replication_slot_advance to return NULL instead of 0/0 if slot not advanced

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Magnus Hagander <magnus@hagander.net>, Postgres hackers <pgsql-hackers@postgresql.org>
Date: 2018-06-01T19:13:25Z
Lists: pgsql-hackers

Attachments

On Fri, Jun 01, 2018 at 02:53:09PM -0400, Michael Paquier wrote:
> Definitely, while the previous patch was around mainly to show where
> things are incorrect, I am attaching a set of patches for HEAD which can
> be used for commit:
> - One patch which addresses the several lock problems and adds some
> instructions about the variables protected by spinlocks for slots in
> use, which should be back-patched.
> - A second patch for HEAD which addresses what has been noticed for the
> new slot advance feature.  This addresses as well the lock problems
> introduced in the new advance code, hopefully the split makes sense to
> others on this thread.
> Once again those only apply to HEAD, please feel free to ping me if you
> would like versions for back-branches (or anybody picking up those
> patches).

And of course I found a typo just after sending those..  Please use the
attached ones instead.
--
Michael

Commits

  1. Fix a couple of bugs with replication slot advancing feature

  2. Fix and document lock handling for in-memory replication slot data