pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: johanfo@gmail.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16182: Error in logs from "renaming temporary statistics"
Date: Thu, 2 Jan 2020 23:07:03 +0900
Message-ID: <20200102140703.GA4841@paquier.xyz> (raw)
In-Reply-To: <16182-06f613c9fd10f3bf@postgresql.org>
References: <16182-06f613c9fd10f3bf@postgresql.org>

On Thu, Jan 02, 2020 at 06:55:37AM +0000, PG Bug reporting form wrote:
> I have checked the permissions of the folder and files, and I can not see
> why this occurs.

This error would occur on Windows when a concurrent process, external
to Postgres, has a file opened in non-shared mode while Postgres tries
to work on it.  In this case the work is done by pgrename() on
Postgres side which is a custom wrapper in src/port/dirmod.c to handle
this kind of scenarios with a retry-and-sleep logic, but it gives up
after 10s (100 tries of 100ms each).

This issue could be usually caused by an antivirus or something that
scans the files of the disk where Postgres data is located.  In this
case, the best thing you could do is to prevent the concurrent
activity from happening by filtering out Postgres data folder.  Nobody
can guess why this file is held opened that long though without
looking at your server when the problem happens.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (5+ messages)  latest in thread

Message-ID: <20200102140703.GA4841@paquier.xyz>
Permalink:  ../20200102140703.GA4841@paquier.xyz/
Also on:    postgresql.org/message-id/20200102140703.GA4841@paquier.xyz

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, johanfo@gmail.com
  Subject: Re: BUG #16182: Error in logs from "renaming temporary statistics"
  In-Reply-To: <20200102140703.GA4841@paquier.xyz>
  References: <16182-06f613c9fd10f3bf@postgresql.org> <20200102140703.GA4841@paquier.xyz>

* 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