]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pg_recvlogical: Honor source cluster file permissions for output files
authorFujii Masao <fujii@postgresql.org>
Wed, 20 May 2026 06:54:13 +0000 (15:54 +0900)
committerFujii Masao <fujii@postgresql.org>
Wed, 20 May 2026 06:57:09 +0000 (15:57 +0900)
commit9590dcfca498879678fe4d280f7b21fff0cbfff9
tree984a3d3c36ae12a577b4493bd3a87ffd41ce6e36
parent59759e1a5b499294d73d409e0bc3343aafd2973f
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 <masao.fujii@gmail.com>
Reviewed-by: Srinath Reddy Sadipiralla <srinath2133@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwHhpizYzMo3nFP4GkNMueSNMY3QfC-gBN1VTXtuiANDvw@mail.gmail.com
Backpatch-through: 14
doc/src/sgml/ref/pg_recvlogical.sgml
src/bin/pg_basebackup/pg_recvlogical.c