pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Subject: Re: More time spending with "delete pending"
Date: Thu, 8 Jul 2021 07:00:01 +0300
Message-ID: <78fa6a17-8e71-7c99-62bd-8a11a47fe894@gmail.com> (raw)
In-Reply-To: <YOQVX1f9/2s1ct6W@paquier.xyz>
References: <c3427edf-d7c0-ff57-90f6-b5de3bb62709@gmail.com>
	<20201115011112.GW30691@telsasoft.com>
	<979f4ee6-9960-e37f-f3ee-f458e87777b0@gmail.com>
	<995713.1605725597@sss.pgh.pa.us>
	<1001775.1605731995@sss.pgh.pa.us>
	<3366bfde-183f-60be-62ab-8ae81b946bac@gmail.com>
	<1006364.1605738508@sss.pgh.pa.us>
	<20729794-e2bf-bd7a-f01b-d132f89fd0d7@gmail.com>
	<fcc8aea0-14d2-9fab-1a4e-37fd1925c49b@gmail.com>
	<YOQVX1f9/2s1ct6W@paquier.xyz>

Hello Michael,

06.07.2021 11:33, Michael Paquier wrote:
> On Sun, Mar 14, 2021 at 06:00:00PM +0300, Alexander Lakhin wrote:
>> I believe that the patch attached to [1] should fix this issue. The
>> patch still applies to master and makes the demotest (attached to [2])
>> pass. Also I've prepared a trivial patch that makes pgwin32_open() use
>> the original stat() function (as in the proposed change for _pgstat64()).
> Hmm.  Knowing that _pgfstat64() has some special handling related to
> files pending for deletion, do we really need that on HEAD?
Yes, this fix is needed for HEAD (b9734c13) as the simple test attached
to [1] shows:
(You can put that script in src\test\modules\test_misc\t and perform
`vcregress taptest src\test\modules\test_misc`.)
t/001_delete_pending.pl ......... # Looks like your test exited with 2
before it could output anything.

and
src\test\modules\test_misc\tmp_check\log\regress_log_001_delete_pending
contains:
# Postmaster PID for node "node" is 1616
error running SQL: 'psql:<stdin>:1: ERROR:  could not stat file
"pg_wal/dummy": Permission denied'
while running 'psql -XAtq -d port=64889 host=127.0.0.1 dbname='postgres'
-f - -v ON_ERROR_STOP=1' with sql 'select count(*) > 0 as ok from
pg_ls_waldir();' at C:/src/postgresql/src/test/perl/PostgresNode.pm line
1771.

As Tom Lane noted above, the code added with bed90759f is dubious
(_NtQueryInformationFile() can not be used to handle the "delete
pending" state as CreateFile() returns INVALID_HANDLE_VALUE in this case.)
Probably that change should be reverted. Should I do it along with the
proposed fix?

[1]
https://www.postgresql.org/message-id/c3427edf-d7c0-ff57-90f6-b5de3bb62709%40gmail.com

Best regards,
Alexander





view thread (27+ messages)  latest in thread

Message-ID: <78fa6a17-8e71-7c99-62bd-8a11a47fe894@gmail.com>
Permalink:  ../78fa6a17-8e71-7c99-62bd-8a11a47fe894@gmail.com/
Also on:    postgresql.org/message-id/78fa6a17-8e71-7c99-62bd-8a11a47fe894@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: exclusion@gmail.com, michael@paquier.xyz, tgl@sss.pgh.pa.us, pryzby@telsasoft.com
  Subject: Re: More time spending with "delete pending"
  In-Reply-To: <78fa6a17-8e71-7c99-62bd-8a11a47fe894@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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