public inbox for [email protected]help / color / mirror / Atom feed
pgsql: Fix incorrect errno in OpenWalSummaryFile() 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix incorrect errno in OpenWalSummaryFile() @ 2026-02-03 02:25 Michael Paquier <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Michael Paquier @ 2026-02-03 02:25 UTC (permalink / raw) To: [email protected] Fix incorrect errno in OpenWalSummaryFile() This routine has an option to bypass an error if a WAL summary file is opened for read but is missing (missing_ok=true). However, the code incorrectly checked for EEXIST, that matters when using O_CREAT and O_EXCL, rather than ENOENT, for this case. There are currently only two callers of OpenWalSummaryFile() in the tree, and both use missing_ok=false, meaning that the check based on the errno is currently dead code. This issue could matter for out-of-core code or future backpatches that would like to use missing_ok set to true. Issue spotted while monitoring this area of the code, after a9afa021e95f. Author: Michael Paquier <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 17 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3b15032dad50d18e45cf12070af13035bd1f2fe9 Modified Files -------------- src/backend/backup/walsummary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix incorrect errno in OpenWalSummaryFile() @ 2026-02-03 02:25 Michael Paquier <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Michael Paquier @ 2026-02-03 02:25 UTC (permalink / raw) To: [email protected] Fix incorrect errno in OpenWalSummaryFile() This routine has an option to bypass an error if a WAL summary file is opened for read but is missing (missing_ok=true). However, the code incorrectly checked for EEXIST, that matters when using O_CREAT and O_EXCL, rather than ENOENT, for this case. There are currently only two callers of OpenWalSummaryFile() in the tree, and both use missing_ok=false, meaning that the check based on the errno is currently dead code. This issue could matter for out-of-core code or future backpatches that would like to use missing_ok set to true. Issue spotted while monitoring this area of the code, after a9afa021e95f. Author: Michael Paquier <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 17 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/213fec296f419af8f199a721a9986e879656555c Modified Files -------------- src/backend/backup/walsummary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix incorrect errno in OpenWalSummaryFile() @ 2026-02-03 02:25 Michael Paquier <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Michael Paquier @ 2026-02-03 02:25 UTC (permalink / raw) To: [email protected] Fix incorrect errno in OpenWalSummaryFile() This routine has an option to bypass an error if a WAL summary file is opened for read but is missing (missing_ok=true). However, the code incorrectly checked for EEXIST, that matters when using O_CREAT and O_EXCL, rather than ENOENT, for this case. There are currently only two callers of OpenWalSummaryFile() in the tree, and both use missing_ok=false, meaning that the check based on the errno is currently dead code. This issue could matter for out-of-core code or future backpatches that would like to use missing_ok set to true. Issue spotted while monitoring this area of the code, after a9afa021e95f. Author: Michael Paquier <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 17 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/719aa13b58576dd4428bd3a31496aac8572d8640 Modified Files -------------- src/backend/backup/walsummary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-02-03 02:25 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-02-03 02:25 pgsql: Fix incorrect errno in OpenWalSummaryFile() Michael Paquier <[email protected]> 2026-02-03 02:25 pgsql: Fix incorrect errno in OpenWalSummaryFile() Michael Paquier <[email protected]> 2026-02-03 02:25 pgsql: Fix incorrect errno in OpenWalSummaryFile() Michael Paquier <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox