Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back
Date
Msg-id CA+TgmoZQfKPZXymiPXf4NyUEDzEjv5h6erW5ys1hySqDmHpN9w@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back
List pgsql-hackers
On Tue, Jan 18, 2022 at 8:55 PM Robert Haas <robertmhaas@gmail.com> wrote:
> Ah, I guess I copied and pasted the options wrong, or something.
> Anyway, I have an idea how to fix this. I didn't realize that we were
> going to read from the bbsink's buffer like this, and it's not
> properly aligned for that. I'll jigger things around to fix that.

Here's a patch. I'm still not able to reproduce the problem either
with the flags you propose (which don't cause a failure) or the ones
which Andres suggests (which make clang bitterly unhappy) or the ones
clang says I should use instead of the ones Andres suggests (which
make initdb fall over, so we never even get to the point of attempting
anything related to the code this patch modified).

Here's a patch, based in part on some off-list discussion with Andres.
I believe Andres has already confirmed that this fix works, but it
wouldn't hurt if Tom wants to verify it also.

-- 
Robert Haas
EDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Add last commit LSN to pg_last_committed_xact()
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back