Re: Detecting skipped data from logical slots (data silently skipped)

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
Subject: Re: Detecting skipped data from logical slots (data silently skipped)
Date: 2016-08-03 17:11:51
Message-ID: CAMsr+YGn+hRp67KYROgKKGUaMQwDTF5LLUKZV5FvANSAUSqx4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3 August 2016 at 21:55, Greg Stark <stark(at)mit(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2016-08-03 17:16:40 Re: Implementing full UTF-8 support (aka supporting 0x00)
Previous Message David G. Johnston 2016-08-03 17:11:45 Re: New version numbering practices