pg_recvlogical prints bogus error when interrupted

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_recvlogical prints bogus error when interrupted
Date: 2022-10-19 21:39:53
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


While reviewing
I noticed that pg_recvlogical prints
"pg_recvlogical: error: unexpected termination of replication stream: "

when signalled with SIGINT/TERM.

Oddly enough, that looks to have "always" been the case, even though clearly
the code tried to make provisions for a different outcome.

It looks to me like all that's needed is to gate the block printing the
message with an !time_to_abort.

I also then noticed that we don't fsync the output file in cases of errors -
that seems wrong to me? Looks to me like that block should be moved till after
the error:?


Andres Freund


Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-10-19 21:54:21 Re: START_REPLICATION SLOT causing a crash in an assert build
Previous Message Peter Geoghegan 2022-10-19 19:37:30 Re: shared memory stats ideas