pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't
7+ messages / 1 participants
[nested] [flat]

* pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't
@ 2019-12-21 22:39 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-21 22:39 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't stat.

This fixes a performance problem introduced by commit 6d7547c21.
ERROR_ACCESS_DENIED is returned in some other cases besides the
delete-pending case considered by that commit; notably, if the
given path names a directory instead of a plain file.  In that
case we'll uselessly loop for 1 second before returning the
failure condition.  That slows down some usage scenarios enough
to cause test timeout failures on our Windows buildfarm critters.

To fix, try to stat() the file, and sleep/loop only if that fails.
It will fail in the delete-pending case, and also in the case where
the deletion completed before we could stat(), so we have the cases
where we want to loop covered.  In the directory case, the stat()
should succeed, letting us exit without a wait.

One case where we'll still wait uselessly is if the access-denied
problem pertains to a directory in the given pathname.  But we don't
expect that to happen in any performance-critical code path.

There might be room to refine this further, but I'll push it now
in hopes of making the buildfarm green again.

Back-patch, like the preceding commit.

Alexander Lakhin and Tom Lane

Discussion: https://postgr.es/m/23073.1576626626@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5406513e997f5ee9de79d4076ae91c04af0c52f6

Modified Files
--------------
src/port/open.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)



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

* pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't
@ 2019-12-21 22:39 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-21 22:39 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't stat.

This fixes a performance problem introduced by commit 6d7547c21.
ERROR_ACCESS_DENIED is returned in some other cases besides the
delete-pending case considered by that commit; notably, if the
given path names a directory instead of a plain file.  In that
case we'll uselessly loop for 1 second before returning the
failure condition.  That slows down some usage scenarios enough
to cause test timeout failures on our Windows buildfarm critters.

To fix, try to stat() the file, and sleep/loop only if that fails.
It will fail in the delete-pending case, and also in the case where
the deletion completed before we could stat(), so we have the cases
where we want to loop covered.  In the directory case, the stat()
should succeed, letting us exit without a wait.

One case where we'll still wait uselessly is if the access-denied
problem pertains to a directory in the given pathname.  But we don't
expect that to happen in any performance-critical code path.

There might be room to refine this further, but I'll push it now
in hopes of making the buildfarm green again.

Back-patch, like the preceding commit.

Alexander Lakhin and Tom Lane

Discussion: https://postgr.es/m/23073.1576626626@sss.pgh.pa.us

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/90281a3a28a7ab9fcf83f471c1ef714f8d96fd1c

Modified Files
--------------
src/port/open.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)



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

* pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't
@ 2019-12-21 22:39 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-21 22:39 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't stat.

This fixes a performance problem introduced by commit 6d7547c21.
ERROR_ACCESS_DENIED is returned in some other cases besides the
delete-pending case considered by that commit; notably, if the
given path names a directory instead of a plain file.  In that
case we'll uselessly loop for 1 second before returning the
failure condition.  That slows down some usage scenarios enough
to cause test timeout failures on our Windows buildfarm critters.

To fix, try to stat() the file, and sleep/loop only if that fails.
It will fail in the delete-pending case, and also in the case where
the deletion completed before we could stat(), so we have the cases
where we want to loop covered.  In the directory case, the stat()
should succeed, letting us exit without a wait.

One case where we'll still wait uselessly is if the access-denied
problem pertains to a directory in the given pathname.  But we don't
expect that to happen in any performance-critical code path.

There might be room to refine this further, but I'll push it now
in hopes of making the buildfarm green again.

Back-patch, like the preceding commit.

Alexander Lakhin and Tom Lane

Discussion: https://postgr.es/m/23073.1576626626@sss.pgh.pa.us

Branch
------
REL_11_STABLE

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

Modified Files
--------------
src/port/open.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)



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

* pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't
@ 2019-12-21 22:39 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-21 22:39 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't stat.

This fixes a performance problem introduced by commit 6d7547c21.
ERROR_ACCESS_DENIED is returned in some other cases besides the
delete-pending case considered by that commit; notably, if the
given path names a directory instead of a plain file.  In that
case we'll uselessly loop for 1 second before returning the
failure condition.  That slows down some usage scenarios enough
to cause test timeout failures on our Windows buildfarm critters.

To fix, try to stat() the file, and sleep/loop only if that fails.
It will fail in the delete-pending case, and also in the case where
the deletion completed before we could stat(), so we have the cases
where we want to loop covered.  In the directory case, the stat()
should succeed, letting us exit without a wait.

One case where we'll still wait uselessly is if the access-denied
problem pertains to a directory in the given pathname.  But we don't
expect that to happen in any performance-critical code path.

There might be room to refine this further, but I'll push it now
in hopes of making the buildfarm green again.

Back-patch, like the preceding commit.

Alexander Lakhin and Tom Lane

Discussion: https://postgr.es/m/23073.1576626626@sss.pgh.pa.us

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/port/open.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)



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

* pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't
@ 2019-12-21 22:39 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-21 22:39 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't stat.

This fixes a performance problem introduced by commit 6d7547c21.
ERROR_ACCESS_DENIED is returned in some other cases besides the
delete-pending case considered by that commit; notably, if the
given path names a directory instead of a plain file.  In that
case we'll uselessly loop for 1 second before returning the
failure condition.  That slows down some usage scenarios enough
to cause test timeout failures on our Windows buildfarm critters.

To fix, try to stat() the file, and sleep/loop only if that fails.
It will fail in the delete-pending case, and also in the case where
the deletion completed before we could stat(), so we have the cases
where we want to loop covered.  In the directory case, the stat()
should succeed, letting us exit without a wait.

One case where we'll still wait uselessly is if the access-denied
problem pertains to a directory in the given pathname.  But we don't
expect that to happen in any performance-critical code path.

There might be room to refine this further, but I'll push it now
in hopes of making the buildfarm green again.

Back-patch, like the preceding commit.

Alexander Lakhin and Tom Lane

Discussion: https://postgr.es/m/23073.1576626626@sss.pgh.pa.us

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/739201b0e62ddb6dc8f4c9ae3b43bf5b6e4393d1

Modified Files
--------------
src/port/open.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)



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

* pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't
@ 2019-12-21 22:39 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-21 22:39 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't stat.

This fixes a performance problem introduced by commit 6d7547c21.
ERROR_ACCESS_DENIED is returned in some other cases besides the
delete-pending case considered by that commit; notably, if the
given path names a directory instead of a plain file.  In that
case we'll uselessly loop for 1 second before returning the
failure condition.  That slows down some usage scenarios enough
to cause test timeout failures on our Windows buildfarm critters.

To fix, try to stat() the file, and sleep/loop only if that fails.
It will fail in the delete-pending case, and also in the case where
the deletion completed before we could stat(), so we have the cases
where we want to loop covered.  In the directory case, the stat()
should succeed, letting us exit without a wait.

One case where we'll still wait uselessly is if the access-denied
problem pertains to a directory in the given pathname.  But we don't
expect that to happen in any performance-critical code path.

There might be room to refine this further, but I'll push it now
in hopes of making the buildfarm green again.

Back-patch, like the preceding commit.

Alexander Lakhin and Tom Lane

Discussion: https://postgr.es/m/23073.1576626626@sss.pgh.pa.us

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/35b28d98335e704a8f3fffb241e837daec95533a

Modified Files
--------------
src/port/open.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)



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

* pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't
@ 2019-12-21 22:39 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2019-12-21 22:39 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't stat.

This fixes a performance problem introduced by commit 6d7547c21.
ERROR_ACCESS_DENIED is returned in some other cases besides the
delete-pending case considered by that commit; notably, if the
given path names a directory instead of a plain file.  In that
case we'll uselessly loop for 1 second before returning the
failure condition.  That slows down some usage scenarios enough
to cause test timeout failures on our Windows buildfarm critters.

To fix, try to stat() the file, and sleep/loop only if that fails.
It will fail in the delete-pending case, and also in the case where
the deletion completed before we could stat(), so we have the cases
where we want to loop covered.  In the directory case, the stat()
should succeed, letting us exit without a wait.

One case where we'll still wait uselessly is if the access-denied
problem pertains to a directory in the given pathname.  But we don't
expect that to happen in any performance-critical code path.

There might be room to refine this further, but I'll push it now
in hopes of making the buildfarm green again.

Back-patch, like the preceding commit.

Alexander Lakhin and Tom Lane

Discussion: https://postgr.es/m/23073.1576626626@sss.pgh.pa.us

Branch
------
REL9_4_STABLE

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

Modified Files
--------------
src/port/open.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)



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


end of thread, other threads:[~2019-12-21 22:39 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-21 22:39 pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't Tom Lane <tgl@sss.pgh.pa.us>
2019-12-21 22:39 pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't Tom Lane <tgl@sss.pgh.pa.us>
2019-12-21 22:39 pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't Tom Lane <tgl@sss.pgh.pa.us>
2019-12-21 22:39 pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't Tom Lane <tgl@sss.pgh.pa.us>
2019-12-21 22:39 pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't Tom Lane <tgl@sss.pgh.pa.us>
2019-12-21 22:39 pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't Tom Lane <tgl@sss.pgh.pa.us>
2019-12-21 22:39 pgsql: In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't Tom Lane <tgl@sss.pgh.pa.us>

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