Subject: Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back

From: Robert Haas <[email-masked]>
Date: Tue, 18 Jan 2022 21:23:08 -0500

On Tue, Jan 18, 2022 at 8:55 PM Robert Haas <[email-masked]> 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

---

From: Tom Lane <[email-masked]>
Date: Tue, 18 Jan 2022 21:29:16 -0500

> wouldn't hurt if Tom wants to verify it also.

WFM too --- at least, pg_basebackup's "make check" passes now.

			regards, tom lane