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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back
Date: 2022-01-19 02:23:08
Message-ID: CA+TgmoZQfKPZXymiPXf4NyUEDzEjv5h6erW5ys1hySqDmHpN9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Tue, Jan 18, 2022 at 8:55 PM Robert Haas <robertmhaas(at)gmail(dot)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 Content-Type Size
align-buffer-more.patch application/octet-stream 1.7 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-01-19 02:29:16 Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back
Previous Message Robert Haas 2022-01-19 01:55:05 Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-01-19 02:29:16 Re: pgsql: Modify pg_basebackup to use a new COPY subprotocol for base back
Previous Message Andres Freund 2022-01-19 02:19:24 Re: Add last commit LSN to pg_last_committed_xact()