Re: [BUGS] Bug in Physical Replication Slots (at least 9.5)?

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Andres Freund <andres(at)anarazel(dot)de>, nag1010(at)gmail(dot)com, jdnelson(at)dyn(dot)com, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUGS] Bug in Physical Replication Slots (at least 9.5)?
Date: 2017-10-26 18:13:55
Message-ID: CAB7nPqSaWrJD0fVN4uX=e=D9FqEYqPq-S2X_TC60kJ0YX2-5eQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Thu, Oct 26, 2017 at 3:05 AM, Kyotaro HORIGUCHI
<horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> The largest obstacle to do that is that walreceiver is not
> utterly concerned to record internals. In other words, it doesn't
> know what a record is. Teaching that introduces much complexity
> and the complexity slows down the walreceiver.
>
> Addition to that, this "problem" occurs also on replication
> without a slot. The latest patch also help the case.

That's why replication slots have been introduced to begin with. The
WAL receiver gives no guarantee that a segment will be retained or not
based on the beginning of a record. That's sad that the WAL receiver
does not track properly restart LSN and instead just uses the flush
LSN. I am beginning to think that a new message type used to report
the restart LSN when a replication slot is in use would just be a
better and more stable solution. I haven't looked at the
implementation details yet though.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Samuel Horwitz 2017-10-26 18:26:47 Segmentation fault with JSONB column from view passed into stored PL/PGSQL procedure that builds a new JSON return value
Previous Message bouellette 2017-10-26 17:45:09 BUG #14875: pg_createcluster fails to load --createclusterconf

Browse pgsql-hackers by date

  From Date Subject
Next Message Sokolov Yura 2017-10-26 19:01:40 Re: logical decoding of two-phase transactions
Previous Message Michael Paquier 2017-10-26 18:03:41 Re: Timeline ID in backup_label file