Pinned files at Windows - Mailing list pgsql-hackers

From Konstantin Knizhnik
Subject Pinned files at Windows
Date
Msg-id a9c76882-27c7-9c92-7843-21d5521b70a9@postgrespro.ru
Whole thread Raw
Responses Re: Pinned files at Windows  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
List pgsql-hackers
Hi, hackers.

There is the following problem with Postgres at Windows: files of 
dropped relation can be blocked for arbitrary long amount of time.
Such behavior is caused by two factors:
1. Windows doesn't allow deletion of opened file.
2. Postgres backend caches opened descriptors and this cache is not 
updated if backend is idle.

So the problem can be reproduced quite easily: create some table in once 
client, then drop it in another client and try to do something with 
relation files.
Segments of dropped relation are visible but any attempt to copy this 
file is rejected.
And this state persists until you perform some command in first client.

I wonder if we are going to address this windows specific issue?
It will cause problems with file backup utilities which are not able to 
copy this file.
And situation when backend can be idle for long amount of time are not 
so rare.

-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company




pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Converting NOT IN to anti-joins during planning
Next
From: Amit Kapila
Date:
Subject: Re: POC: Cleaning up orphaned files using undo logs