Re: Detecting skipped data from logical slots (data silently skipped) - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Detecting skipped data from logical slots (data silently skipped)
Date
Msg-id CAMsr+YGn+hRp67KYROgKKGUaMQwDTF5LLUKZV5FvANSAUSqx4A@mail.gmail.com
Whole thread Raw
In response to Re: Detecting skipped data from logical slots (data silently skipped)  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On 3 August 2016 at 21:55, Greg Stark <stark@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

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: New version numbering practices
Next
From: Craig Ringer
Date:
Subject: Re: Implementing full UTF-8 support (aka supporting 0x00)