pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix get_dirent_type() for Windows junction points.
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix get_dirent_type() for Windows junction points.
@ 2022-07-22 05:02 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Munro @ 2022-07-22 05:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix get_dirent_type() for Windows junction points.

Commit 87e6ed7c8 added code that intended to report Windows "junction
points" as DT_LNK (the same way we report symlinks on Unix).  Windows
junction points are *also* directories according to the Windows
attributes API, and we were reporting them as as DT_DIR.  Change the
order we check the attribute flags, to prioritize DT_LNK.

If at some point we start using Windows' recently added real symlinks
and need to distinguish them from junction points, we may need to
rethink this, but for now this continues the tradition of wrapper
functions that treat junction points as symlinks.

Back-patch to 14, where get_dirent_type() landed.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/CA%2BhUKGLzLK4PUPx0_AwXEWXOYAejU%3D7XpxnYE55Y%2Be7hB2N3FA%40mail.gmail.com
Discussion: https://postgr.es/m/20220721111751.x7hod2xgrd76xr5c%40alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9d3444dcce4d62716edec9c58c1b40be42185e7b

Modified Files
--------------
src/port/dirent.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix get_dirent_type() for Windows junction points.
@ 2022-07-22 05:02 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Munro @ 2022-07-22 05:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix get_dirent_type() for Windows junction points.

Commit 87e6ed7c8 added code that intended to report Windows "junction
points" as DT_LNK (the same way we report symlinks on Unix).  Windows
junction points are *also* directories according to the Windows
attributes API, and we were reporting them as as DT_DIR.  Change the
order we check the attribute flags, to prioritize DT_LNK.

If at some point we start using Windows' recently added real symlinks
and need to distinguish them from junction points, we may need to
rethink this, but for now this continues the tradition of wrapper
functions that treat junction points as symlinks.

Back-patch to 14, where get_dirent_type() landed.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/CA%2BhUKGLzLK4PUPx0_AwXEWXOYAejU%3D7XpxnYE55Y%2Be7hB2N3FA%40mail.gmail.com
Discussion: https://postgr.es/m/20220721111751.x7hod2xgrd76xr5c%40alvherre.pgsql

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6d306ab731689ca01cdcafda9862732dcc075778

Modified Files
--------------
src/port/dirent.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix get_dirent_type() for Windows junction points.
@ 2022-07-22 05:02 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Thomas Munro @ 2022-07-22 05:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix get_dirent_type() for Windows junction points.

Commit 87e6ed7c8 added code that intended to report Windows "junction
points" as DT_LNK (the same way we report symlinks on Unix).  Windows
junction points are *also* directories according to the Windows
attributes API, and we were reporting them as as DT_DIR.  Change the
order we check the attribute flags, to prioritize DT_LNK.

If at some point we start using Windows' recently added real symlinks
and need to distinguish them from junction points, we may need to
rethink this, but for now this continues the tradition of wrapper
functions that treat junction points as symlinks.

Back-patch to 14, where get_dirent_type() landed.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/CA%2BhUKGLzLK4PUPx0_AwXEWXOYAejU%3D7XpxnYE55Y%2Be7hB2N3FA%40mail.gmail.com
Discussion: https://postgr.es/m/20220721111751.x7hod2xgrd76xr5c%40alvherre.pgsql

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fee0165fc1cfaf4ac0052c4554810e46c02dd70c

Modified Files
--------------
src/port/dirent.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2022-07-22 05:02 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22 05:02 pgsql: Fix get_dirent_type() for Windows junction points. Thomas Munro <tmunro@postgresql.org>
2022-07-22 05:02 pgsql: Fix get_dirent_type() for Windows junction points. Thomas Munro <tmunro@postgresql.org>
2022-07-22 05:02 pgsql: Fix get_dirent_type() for Windows junction points. Thomas Munro <tmunro@postgresql.org>

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