On 2023/08/16 16:51, Michael Paquier wrote:
> Anyway, attached is a patch to add a 4th argument "flush" that
> defaults to false. Thoughts about this version are welcome.
When the "transactional" option is set to true, WAL including
the record generated by the pg_logical_emit_message() function is flushed
at the end of the transaction based on the synchronous_commit setting.
However, in the current patch, if "transactional" is set to false and
"flush" is true, the function flushes the WAL immediately without
considering synchronous_commit. Is this the intended behavior?
I'm not sure how the function should work in this case, though.
Though I don't understand the purpose of this option fully yet,
is flushing the WAL sufficient? Are there scenarios where the function
should ensure that the WAL is not only flushed but also replicated
to the standby?
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION