On 3 August 2016 at 21:55, Greg Stark <st...@mit.edu> wrote:
> I didn't follow all of that but I wonder if it isn't just that when you
> restore from backup you should be creating a new slot?
Yes, you should.
But when you restore a Pg instance from a disk snapshot or similar it can't
tell it isn't the original of its self. It has no way to know "I shouldn't
connect to this slot and consume data from it". Right now the upstream has
no way to tell it "that data's gone, sorry" - it just ignores the
downstream's requested start position and starts from wherever it thinks
the downstream is up to.
With physical replication we'll detect such a problem. With logical
replication we'll silently continue with an invisible gap in the history.
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services