pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix stat() for recursive junction points on Windows. 4+ messages / 2 participants [nested] [flat]
* pgsql: Fix stat() for recursive junction points on Windows. @ 2022-10-25 03:29 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 4+ messages in thread From: Thomas Munro @ 2022-10-25 03:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix stat() for recursive junction points on Windows. Commit c5cb8f3b supposed that we'd only ever have to follow one junction point in stat(), because we don't construct longer chains of them ourselves. When examining a parent directory supplied by the user, we should really be able to cope with longer chains, just in case someone has their system set up that way. Choose an arbitrary cap of 8, to match the minimum acceptable value of SYMLOOP_MAX in POSIX. Previously I'd avoided reporting ELOOP thinking Windows didn't have it, but it turns out that it does, so we can use the proper error number. Reviewed-by: Roman Zharkov <r.zharkov@postgrespro.ru> Discussion: https://postgr.es/m/CA%2BhUKGJ7JDGWYFt9%3D-TyJiRRy5q9TtPfqeKkneWDr1XPU1%2Biqw%40mail.gmail.com Discussion: https://postgr.es/m/CA%2BhUKG%2BajSQ_8eu2AogTncOnZ5me2D-Cn66iN_-wZnRjLN%2Bicg%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/4517358ee78213cd2ca18270ab4d32cd69b0b19d Modified Files -------------- src/port/win32stat.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix stat() for recursive junction points on Windows. @ 2025-01-18 14:34 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 4+ messages in thread From: Andrew Dunstan @ 2025-01-18 14:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix stat() for recursive junction points on Windows. Commit c5cb8f3b supposed that we'd only ever have to follow one junction point in stat(), because we don't construct longer chains of them ourselves. When examining a parent directory supplied by the user, we should really be able to cope with longer chains, just in case someone has their system set up that way. Choose an arbitrary cap of 8, to match the minimum acceptable value of SYMLOOP_MAX in POSIX. Previously I'd avoided reporting ELOOP thinking Windows didn't have it, but it turns out that it does, so we can use the proper error number. Reviewed-by: Roman Zharkov <r.zharkov@postgrespro.ru> Discussion: https://postgr.es/m/CA%2BhUKGJ7JDGWYFt9%3D-TyJiRRy5q9TtPfqeKkneWDr1XPU1%2Biqw%40mail.gmail.com Discussion: https://postgr.es/m/CA%2BhUKG%2BajSQ_8eu2AogTncOnZ5me2D-Cn66iN_-wZnRjLN%2Bicg%40mail.gmail.com Backpatched commit 4517358e as above by Thomas Munro into releases 13 thru 15 Discussion: https://postgr.es/m/CA+hUKGLbnv+pe3q1fYOVkLD3pMra7GuihfMxUN-1831YH9RYQg@mail.gmail.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9f1c67488e59b9b8a1791e75783f7a817216259d Author: Thomas Munro <tmunro@postgresql.org> Modified Files -------------- src/port/win32stat.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix stat() for recursive junction points on Windows. @ 2025-01-18 14:34 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 4+ messages in thread From: Andrew Dunstan @ 2025-01-18 14:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix stat() for recursive junction points on Windows. Commit c5cb8f3b supposed that we'd only ever have to follow one junction point in stat(), because we don't construct longer chains of them ourselves. When examining a parent directory supplied by the user, we should really be able to cope with longer chains, just in case someone has their system set up that way. Choose an arbitrary cap of 8, to match the minimum acceptable value of SYMLOOP_MAX in POSIX. Previously I'd avoided reporting ELOOP thinking Windows didn't have it, but it turns out that it does, so we can use the proper error number. Reviewed-by: Roman Zharkov <r.zharkov@postgrespro.ru> Discussion: https://postgr.es/m/CA%2BhUKGJ7JDGWYFt9%3D-TyJiRRy5q9TtPfqeKkneWDr1XPU1%2Biqw%40mail.gmail.com Discussion: https://postgr.es/m/CA%2BhUKG%2BajSQ_8eu2AogTncOnZ5me2D-Cn66iN_-wZnRjLN%2Bicg%40mail.gmail.com Backpatched commit 4517358e as above by Thomas Munro into releases 13 thru 15 Discussion: https://postgr.es/m/CA+hUKGLbnv+pe3q1fYOVkLD3pMra7GuihfMxUN-1831YH9RYQg@mail.gmail.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/e708f31881fd767af6d665968f6124ab82a08962 Author: Thomas Munro <tmunro@postgresql.org> Modified Files -------------- src/port/win32stat.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix stat() for recursive junction points on Windows. @ 2025-01-18 14:34 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 4+ messages in thread From: Andrew Dunstan @ 2025-01-18 14:34 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix stat() for recursive junction points on Windows. Commit c5cb8f3b supposed that we'd only ever have to follow one junction point in stat(), because we don't construct longer chains of them ourselves. When examining a parent directory supplied by the user, we should really be able to cope with longer chains, just in case someone has their system set up that way. Choose an arbitrary cap of 8, to match the minimum acceptable value of SYMLOOP_MAX in POSIX. Previously I'd avoided reporting ELOOP thinking Windows didn't have it, but it turns out that it does, so we can use the proper error number. Reviewed-by: Roman Zharkov <r.zharkov@postgrespro.ru> Discussion: https://postgr.es/m/CA%2BhUKGJ7JDGWYFt9%3D-TyJiRRy5q9TtPfqeKkneWDr1XPU1%2Biqw%40mail.gmail.com Discussion: https://postgr.es/m/CA%2BhUKG%2BajSQ_8eu2AogTncOnZ5me2D-Cn66iN_-wZnRjLN%2Bicg%40mail.gmail.com Backpatched commit 4517358e as above by Thomas Munro into releases 13 thru 15 Discussion: https://postgr.es/m/CA+hUKGLbnv+pe3q1fYOVkLD3pMra7GuihfMxUN-1831YH9RYQg@mail.gmail.com Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fbf8efbda88ce3cac6b135cbba93d4ee7c80dde8 Author: Thomas Munro <tmunro@postgresql.org> Modified Files -------------- src/port/win32stat.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2025-01-18 14:34 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-10-25 03:29 pgsql: Fix stat() for recursive junction points on Windows. Thomas Munro <tmunro@postgresql.org> 2025-01-18 14:34 pgsql: Fix stat() for recursive junction points on Windows. Andrew Dunstan <andrew@dunslane.net> 2025-01-18 14:34 pgsql: Fix stat() for recursive junction points on Windows. Andrew Dunstan <andrew@dunslane.net> 2025-01-18 14:34 pgsql: Fix stat() for recursive junction points on Windows. Andrew Dunstan <andrew@dunslane.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox