pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Жарков Роман <r.zharkov@postgrespro.ru>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Badrul Chowdhury <bachow@microsoft.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Intermittent pg_ctl failures on Windows
Date: Thu, 18 Jul 2019 14:04:34 +0700
Message-ID: <ECD07611-BBA8-4E9B-975C-50E59F7154DA@postgrespro.ru> (raw)
In-Reply-To: <20190718053834.GG1416@paquier.xyz>
References: <16922.1520722108@sss.pgh.pa.us>
	<DM5PR2101MB0984D3DB39BCCCF189ECD15ED1D30@DM5PR2101MB0984.namprd21.prod.outlook.com>
	<0057a0ce5a8893e4713a9a9d7e352162@postgrespro.ru>
	<26631.1563371508@sss.pgh.pa.us>
	<20190718053834.GG1416@paquier.xyz>

Hello,

Therefore, we suggest replace the deletion of a lock file by renaming it.
unlink in windows is not an atomic operation.
When we try to open the file between 
SetDispositionInformationFile and CloseFile we get ERROR_DELETE_PENDING ( see screenshot )

regards, Roman

> 18 июля 2019 г., в 12:38, Michael Paquier <michael@paquier.xyz>
> 
> Oh, it is.  A lot.  And this has been discussed a couple of times
> across multiple threads on -bugs and/or -hackers.  I think that
> Windows just lacks a way to detect reliably if a file is pending for
> deletion or not, and there is no way that we are going to enforce
> blindly a ERROR_DELETE_PENDING when we see EACCES.  One code path
> which is impacted by that is our wrapper for stat() for the win32
> port...  For now I'd rather believe that what the OS tells us is true,
> in which case here it is plain wrong, but well. 
> --
> Michael

Attachments:

image1.png (image/png, 134.7K) download view image

view thread (16+ messages)  latest in thread

Message-ID: <ECD07611-BBA8-4E9B-975C-50E59F7154DA@postgrespro.ru>
Permalink:  ../ECD07611-BBA8-4E9B-975C-50E59F7154DA@postgrespro.ru/
Also on:    postgresql.org/message-id/ECD07611-BBA8-4E9B-975C-50E59F7154DA@postgrespro.ru

 · 

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: r.zharkov@postgrespro.ru, michael@paquier.xyz, tgl@sss.pgh.pa.us, bachow@microsoft.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Intermittent pg_ctl failures on Windows
  In-Reply-To: <ECD07611-BBA8-4E9B-975C-50E59F7154DA@postgrespro.ru>

* 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