Re: Outdated replication protocol error? - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Outdated replication protocol error?
Date
Msg-id f006728a11086717a50c717e73488ab2c85f2d61.camel@j-davis.com
Whole thread Raw
In response to Re: Outdated replication protocol error?  (Andres Freund <andres@anarazel.de>)
Responses Re: Outdated replication protocol error?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Fri, 2021-01-15 at 13:55 -0800, Andres Freund wrote:
> > > We should either:
> > > 
> > > 1. Document that IDENTIFY_SYSTEM must always be run before
> > > START_REPLICATION, and always issue a WARNING if that's not done
> > > (an
> > > ERROR might break existing applications); or
> > > 
> > > 2. If the commit is out of date and no longer needed, or if it's
> > > easy
> > > enough to fix, just remove the error (and Assert a valid
> > > ThisTimeLineID).
> > 
> > +1 to remove the error if START_REPLICATION can always work fine
> > without
> > IDENTIFY_SYSTEM. I found that the error happens when we connect to
> > the standby
> > and just run START_REPLICATION without IDENTIFY_SYSTEM. But I'm not
> > sure
> > if IDENTIFY_SYSTEM is actually necessary even in that case.
> 
> The current approach seems quite bad to me too. By that point the
> value
> could be just about arbitrarily out of date - but that doesn't really
> matter because GetStandbyFlushRecPtr() updates it. And for the
> !am_cascading_walsender it's trivial to compute.

[ digging up old thread ]

It seems everyone agrees that the current behavior is strange. Any
ideas on a solution here?

> Has anybody dug out the thread leading to the commit?


https://www.postgresql.org/message-id/CAMsr%2BYEN04ztb%2BSDb_UfD72Kg5M3F%2BCpad31QBKT2rRjysmxRg%40mail.gmail.com

Regards,
    Jeff Davis





pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Unresolved repliaction hang and stop problem.
Next
From: Andres Freund
Date:
Subject: Re: Split xlog.c