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

Michael Paquier <[email protected]> Thu, 2 Jan 2020 23:07:03 +0900
Newsgroups gmane.comp.db.postgresql.bugs
Message-ID <[email protected]>
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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4N+QcACgkQnvQgOdby
QH37aA/+MdVeJ5aBg0KfC+XxPwXMECOOcSdHjAgQIEE5/vC+xpjGc5LHfumdLAVZ
0dgZY1BLVRuDE2y+gC0QM23UzqSYAkiNPa7wO8HCBZKyWEsxwDiuF3SkgpfDBqOA
OAOwNgUofV1Ss+K+6koPDw9vfRDg9/gadynsLtnve/zSmHncpWNu5hUsTNyrB1/6
MDT+ijWlNM3MIUE2qYk9z42jOih/u0cS0mwXqERuSGe+6Sl0b1FYDwN90qTF9Nsf
T2bZL6iar1wkEHqkcnui8FZwR1o9knHZ3U114nwMNP4mFXb6j6OzTO/2UpU1pqI7
KQS4MpP0uc9s1sRoDuRGu3ed9LAb6dkwGjrw34ZCAHveJdoA2c8nm/xMiAjvfMT5
ISrx94SQRrtKV1ejmbCQnMDErc5o0O+1J7FlUzhtnNrjHzJI3MEeGiWOnZEXX0Nw
NqQZ6LHsts3dwbJ4aO5Z7EFhyuogPEYtY1X8L2cZsKeWwQttfSJLNVXpjBrqqes+
ALzE6DS3aIo/hgWnwHxKoqKeykEJWTk2BBuLpLga9R9QzC6ECT7B7puK3zJa7MyC
FrA3MCO9J5zDC+Z3/8lpyhqumxbyQrFldZrKYxUfuaWPmkB76Scp33OkwLkVQKyj
hIEVyYsRM0JpkChLTXErjCT2bsPg9fqCcqN4xVAw/dZShkBMoP4=
=rVcH
-----END PGP SIGNATURE-----