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

2022-01-19 Thread Robert Haas
On Tue, Jan 18, 2022 at 9:29 PM Tom Lane wrote: > Robert Haas writes: > > 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. > > WFM too --- at least, pg_ba

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

2022-01-18 Thread Tom Lane
Robert Haas writes: > 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. WFM too --- at least, pg_basebackup's "make check" passes now.

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

2022-01-18 Thread Robert Haas
On Tue, Jan 18, 2022 at 8:55 PM Robert Haas 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 th

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

2022-01-18 Thread Robert Haas
On Tue, Jan 18, 2022 at 5:12 PM Tom Lane wrote: > Now that I re-read what you did, I believe you need both of > > -fsanitize=alignment -fsanitize-trap=alignment > > to enable those traps to happen. That seems to be the case with > Apple's clang, anyway. Ah, I guess I copied and pasted the option

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

2022-01-18 Thread Andres Freund
On 2022-01-18 17:12:00 -0500, Tom Lane wrote: > Robert Haas writes: > > Unfortunately, I can't reproduce this locally, even with COPT=-Wall > > -Werror -fno-omit-frame-pointer -fsanitize-trap=alignment > > -Wno-deprecated-declarations -DWRITE_READ_PARSE_PLAN_TREES > > -DSTRESS_SORT_INT_MIN -DENFOR

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

2022-01-18 Thread Tom Lane
Robert Haas writes: > Unfortunately, I can't reproduce this locally, even with COPT=-Wall > -Werror -fno-omit-frame-pointer -fsanitize-trap=alignment > -Wno-deprecated-declarations -DWRITE_READ_PARSE_PLAN_TREES > -DSTRESS_SORT_INT_MIN -DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS. Now that I re-rea

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

2022-01-18 Thread Tom Lane
I wrote: >> Tom, any chance you can get a stack trace? > Hmm, I'd assumed that was just a cosmic ray or something. My mistake: it's failing because of -fsanitize=alignment. Here's the stack trace: * frame #0: 0x00010885dfd0 postgres`sendFile(sink=0x7fdedf071cb0, readfilename="./globa

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

2022-01-18 Thread Robert Haas
On Tue, Jan 18, 2022 at 4:36 PM Tom Lane wrote: > Robert Haas writes: > > Andres pointed out to me that longfin is sad: > > > 2022-01-18 14:52:35.484 EST [82470:4] LOG: server process (PID 82487) > > was terminated by signal 4: Illegal instruction: 4 > > > Tom, any chance you can get a stack tra

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

2022-01-18 Thread Tom Lane
Robert Haas writes: > Andres pointed out to me that longfin is sad: > 2022-01-18 14:52:35.484 EST [82470:4] LOG: server process (PID 82487) > was terminated by signal 4: Illegal instruction: 4 > Tom, any chance you can get a stack trace? Hmm, I'd assumed that was just a cosmic ray or something

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

2022-01-18 Thread Robert Haas
On Tue, Jan 18, 2022 at 1:51 PM Robert Haas wrote: > Modify pg_basebackup to use a new COPY subprotocol for base backups. Andres pointed out to me that longfin is sad: 2022-01-18 14:52:35.484 EST [82470:4] LOG: server process (PID 82487) was terminated by signal 4: Illegal instruction: 4 2022-0