Pinned files at Windows

From: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Pinned files at Windows
Date: 2019-05-27 09:26:58
Message-ID: a9c76882-27c7-9c92-7843-21d5521b70a9@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-05-27 09:58:58 Re: POC: Cleaning up orphaned files using undo logs
Previous Message Antonin Houska 2019-05-27 08:43:40 Re: Converting NOT IN to anti-joins during planning