pg_recvlogical: Honor source cluster file permissions for output files

Commit c37b3d08ca6 attempted to preserve group permissions on pg_recvlogical
output files when group access was enabled on the source cluster. However,
the output files were still created with a fixed S_IRUSR | S_IWUSR mode,
preventing group-read permissions from being applied.

This commit fixes the issue by creating output files with pg_file_create_mode
instead of a hard-coded mode. This allows pg_recvlogical to correctly preserve
group permissions from the source cluster.

Backpatch to all supported branches.

Author: Fujii Masao <[email protected]>
Reviewed-by: Srinath Reddy Sadipiralla <[email protected]>
Discussion: 
https://postgr.es/m/cahgqgwhhpizyzmo3nfp4gknmuesnmy3qfc-gbn1vtxtuian...@mail.gmail.com
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/263d1e6dfeec5e573db4f78e6dac4bb17259c482

Modified Files
--------------
doc/src/sgml/ref/pg_recvlogical.sgml   | 2 +-
src/bin/pg_basebackup/pg_recvlogical.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

Reply via email to