On Tue, May 26, 2026 at 09:13:30PM -0300, Euler Taveira wrote:
> As I said I'm fine with your proposed patch.

With the patch posted at [1] in place, the problem is indeed gone.

My first reaction is that we may want to update the two code paths of
csvlog.c and jsonlog.c with a similar check, switching away from
MyBackendType to your new syslogger_setup_done.  That would be more
defensive in the long-term if someone has the idea to refactor or
reshape this code.

It also looks important to me to plant a few comments to document the
purpose of the flag (which is I'm sure something you were going to
do).  It is not complicated to see what's the purpose by grepping for
syslogger_setup_done, but it would be less guessing for the reader.

Keeping redirection_done out of this decision-making logic sounds
indeed wiser, the flag serves a different purpose..

As a whole, I'm fine with this idea.

[1]: https://www.postgresql.org/message-id/ahV9KzLOqvOw78C3%40alvherre.pgsql
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to