Re: BUG #16182: Error in logs from "renaming temporary statistics"

From: Johan Fredrik Øhman <johanfo(at)ohman(dot)no>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16182: Error in logs from "renaming temporary statistics"
Date: 2020-01-03 20:06:16
Message-ID: CADB9d9oODSQNAdyAhWD89A4tN7yFY9ACygQwqxdBnUKJjTCFoQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thanks for this informative feedback. I was thinking that antivirus was an
explanation, but I am pretty sure the the PG data directory was on the
antivirus exclusion list. However, in light of this I will try to monitor
the processes that access this file and come back to you on the findings.
--
JF

On Thu, Jan 2, 2020 at 3:07 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> 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
>

--
Johan Fredrik Øhman

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrey Borodin 2020-01-04 17:57:57 Re: BUG #16122: segfault pg_detoast_datum (datum=0x0) at fmgr.c:1833 numrange query
Previous Message Andrey Borodin 2020-01-03 19:05:09 Re: BUG #16122: segfault pg_detoast_datum (datum=0x0) at fmgr.c:1833 numrange query