Re: Replication identifiers, take 4

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Steve Singer <steve(at)ssinger(dot)info>, Petr Jelinek <petr(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Subject: Re: Replication identifiers, take 4
Date: 2015-03-24 15:33:13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Here's the next version of this patch. I've tried to address the biggest
issue (documentation) and some more. Now that both the more flexible
commit WAL record format and the BKI_FORCE_NOT_NULL thing is in, it
looks much cleaner.

* Loads of documentation and comments
* Revamped locking strategy. There's now a LWLock protecting all the
replication progress array and spinlock for the individual sltos.
* Simpler checkpoint format.
* A new pg_replication_identifier_progress() function returning a
individual identifier's replication progress; previously there was
only the view showing all of them.
* Lots of minor cleanup
* Some more tests

I'd greatly appreciate some feedback on the documentation. I'm not
entirely sure into how much detail to go; and where exactly in the docs
to place it. I do wonder if we shouldn't merge this with the logical
decoding section and whether we could also document commit timestamps
somewhere in there.

I've verified that this correctly works on a stanby; replication
progress is replicated correctly. I think there's two holes though:
Changing the replication progress without replicating anything and
dropping a replication identifier with some replication progress might
not work correctly. That's fairly easily fixed and I intend to do so.

Other than that I'm not aware of outstanding issues.



Andres Freund

Andres Freund
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-Introduce-replication-identifiers-v1.0.patch text/x-patch 122.8 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2015-03-24 15:38:49 Re: Auditing extension for PostgreSQL (Take 2)
Previous Message David Steele 2015-03-24 14:28:38 Re: recovery_target_time ignored ?