pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SV: Log files polluted with permission denied error messages after every 10 seconds
34+ messages / 7 participants
[nested] [flat]

* SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-09 05:03  Niels Jespersen <NJN@dst.dk>
  0 siblings, 1 reply; 34+ messages in thread

From: Niels Jespersen @ 2021-03-09 05:03 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; Tom Lane <tgl@sss.pgh.pa.us>; Thomas Munro <thomas.munro@gmail.com>; +Cc: Michael Paquier <michael@paquier.xyz>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

>
>
>Fra: Andrus <kobruleht2@hot.ee>
>Sendt: 8. marts 2021 23:24
>Emne: Re: Log files polluted with permission denied error messages after every 10 seconds
>
>Permission denied error occur in  Windows. Debian logs doesnt contain it.
>In Windows also pg_database_size('mydb')  and similar ones fail frequently with permission denied error.

Any hints in Windows event viewer? Events occurring at the same time showing up there.

>I got information about r1soft idera backup client used. It runs only once per night for 16 minutes and compares disk blocks to find changed blocks to backup. So it should not cause permission denied errors after every 10 seconds.
>Andrus.
>


^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-09 08:43  Andrus <kobruleht2@hot.ee>
  parent: Niels Jespersen <NJN@dst.dk>
  0 siblings, 1 reply; 34+ messages in thread

From: Andrus @ 2021-03-09 08:43 UTC (permalink / raw)
  To: Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Thomas Munro <thomas.munro@gmail.com>; +Cc: Michael Paquier <michael@paquier.xyz>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

> Any hints in Windows event viewer? Events  occurring at the same time showing up there.

Looked into Administrative Events/Custom views and few others. There are 
no messages about this. Windowsi perfomance monitor and Filemon show 
files opened by process.

How to do reverse: log processes and threads which use files in pg_wal 
directory ?

Is there some utility for this or can restart manager or other API  used 
to create such log?

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-09 10:07  Thomas Munro <thomas.munro@gmail.com>
  parent: Andrus <kobruleht2@hot.ee>
  0 siblings, 1 reply; 34+ messages in thread

From: Thomas Munro @ 2021-03-09 10:07 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael@paquier.xyz>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

On Tue, Mar 9, 2021 at 9:43 PM Andrus <kobruleht2@hot.ee> wrote:
>  > Any hints in Windows event viewer? Events occurring at the same time showing up there.
>
> Looked into Administrative Events/Custom views and few others. There are no messages about this. Windowsi perfomance monitor and Filemon show files opened by process.
>
> How to do reverse: log processes and threads which use files in pg_wal directory ?

Maybe this does the reverse?

https://docs.microsoft.com/en-us/sysinternals/downloads/handle





^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-09 16:24  Andrus <kobruleht2@hot.ee>
  parent: Thomas Munro <thomas.munro@gmail.com>
  0 siblings, 1 reply; 34+ messages in thread

From: Andrus @ 2021-03-09 16:24 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; +Cc: Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael@paquier.xyz>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi!

Maybe this does the reverse?
> https://docs.microsoft.com/en-us/sysinternals/downloads/handle

Examined todays logs in other windows 2019 server with Postgres 13.1

Permission denied occurs single file but permanently . Last entry is 6 
minutes ago:

2021-03-09 00:02:23.915 EET [11328] LOG:  could not rename file 
"pg_wal/000000010000004C00000034": Permission denied

2021-03-09 00:07:24.430 EET [11328] LOG:  could not rename file 
"pg_wal/000000010000004C00000034": Permission denied

2021-03-09 00:12:34.392 EET [11328] LOG:  could not rename file 
"pg_wal/000000010000004C00000034": Permission denied
2021-03-09 00:17:24.270 EET [11328] LOG:  could not rename file 
"pg_wal/000000010000004C00000034": Permission denied
2021-03-09 00:22:23.780 EET [11328] LOG:  could not rename file 
"pg_wal/000000010000004C00000034": Permission denied
..

2021-03-09 17:59:04 EET     checkpointerLOG:  could not rename file 
"pg_wal/000000010000004C00000034": Permission denied

Used Resource Monitor / CPU  / Associated Handles and searched for 
"000000010000004C00000034". Resource Monitor shows that process 11336 is 
using that file

pg_stat_activity shows that this is "background writer"  waiting for 
event BgWriterMain or BgWriterHibernate

Permisson denied exception occurs accoring to log above in process   
11328  which is listed as checkpointer.

So Background writer has locked the file permanently. Checkpointer tries 
to write into it and gets permission denied error all the time.

How to fix this ?

Andrus.

Attachments:

ememfomdjpicdamp.png (image/png, 135.3K) download view image
^ permalink raw reply [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-10 09:10  Andrus <kobruleht2@hot.ee>
  parent: Andrus <kobruleht2@hot.ee>
  0 siblings, 1 reply; 34+ messages in thread

From: Andrus @ 2021-03-10 09:10 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; +Cc: Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael@paquier.xyz>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Today log file contains

2021-03-10 11:01:58 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A0000003B": Permission denied

messages. Resource Manager shows that 000000010000000A0000003B is is 
locked by process 30376


According to pg_stat_activity this is regular postgres process which is 
in idle state and waiting for ClientRead event. It has executed last 
query  an hour ago.

It looks like wal files are not released after usage.

Andrus.

Attachments:

ngleidpkbkmfnhmj.png (image/png, 77.3K) download view image
^ permalink raw reply [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-10 13:20  Andrus <kobruleht2@hot.ee>
  parent: Andrus <kobruleht2@hot.ee>
  0 siblings, 2 replies; 34+ messages in thread

From: Andrus @ 2021-03-10 13:20 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; +Cc: Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael@paquier.xyz>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi!

After re-starting postgres service problem persists.

Log file contains permission denied errors exactly after every 10 seconds:

...

2021-03-10 15:15:45 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000030": Permission denied
2021-03-10 15:15:55 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000031": Permission denied
2021-03-10 15:16:06 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000032": Permission denied
2021-03-10 15:16:16 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000033": Permission denied
2021-03-10 15:16:26 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000034": Permission denied
2021-03-10 15:16:36 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000037": Permission denied
2021-03-10 15:16:46 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000038": Permission denied
2021-03-10 15:16:56 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000039": Permission denied
2021-03-10 15:17:06 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A0000003B": Permission denied
2021-03-10 15:17:16 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A0000003E": Permission denied
2021-03-10 15:17:26 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A0000003F": Permission denied
2021-03-10 15:17:36 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000041": Permission denied
2021-03-10 15:17:46 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000044": Permission denied
2021-03-10 15:17:56 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000045": Permission denied
2021-03-10 15:18:06 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000046": Permission denied
2021-03-10 15:18:16 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000047": Permission denied
2021-03-10 15:18:26 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000048": Permission denied
2021-03-10 15:18:36 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A00000049": Permission denied
2021-03-10 15:18:46 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000000A0000004B": Permission denied


Windows Resource manger shows that wal files are used by large number of 
postgres processes:

postgres.exe    22656    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000075
postgres.exe    30788    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000075
postgres.exe    14144    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000074
postgres.exe    20360    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000073
postgres.exe    25356    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000073
postgres.exe    4136    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000075
postgres.exe    7712    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000073
postgres.exe    7020    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000073
postgres.exe    26128    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000073
postgres.exe    13740    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000073
postgres.exe    25660    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000073
postgres.exe    19120    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000073
postgres.exe    30152    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000073
postgres.exe    12140    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000072
postgres.exe    500    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000072
postgres.exe    17616    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000072
postgres.exe    8552    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000072
postgres.exe    23764    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000074
postgres.exe    28400    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000072
postgres.exe    30172    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000072
postgres.exe    28004    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000071
postgres.exe    28236    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000071
postgres.exe    25840    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000072
postgres.exe    20048    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000071
postgres.exe    30156    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000071
postgres.exe    26976    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000071
postgres.exe    26312    File    C:\Program 
Files\PostgreSQL\13\data\pg_wal\000000010000000A00000074

...

Many wal files are used by multiple processes.

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-12 01:27  Thomas Munro <thomas.munro@gmail.com>
  parent: Andrus <kobruleht2@hot.ee>
  1 sibling, 0 replies; 34+ messages in thread

From: Thomas Munro @ 2021-03-12 01:27 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Michael Paquier <michael@paquier.xyz>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi Andrus,

On Thu, Mar 11, 2021 at 2:21 AM Andrus <kobruleht2@hot.ee> wrote:
> Windows Resource manger shows that wal files are used by large number of postgres processes:
>
> postgres.exe    22656    File    C:\Program Files\PostgreSQL\13\data\pg_wal\000000010000000A00000075
> postgres.exe    30788    File    C:\Program Files\PostgreSQL\13\data\pg_wal\000000010000000A00000075
> postgres.exe    14144    File    C:\Program Files\PostgreSQL\13\data\pg_wal\000000010000000A00000074
...

This is normal -- postgres.exe holds open various files it's
interested in, and it's supposed to be OK for them to be renamed or
unlinked at any time by another process because they are opened with
special FILE_SHARE_XXX flags that allow that.  That list doesn't show
the open flags, but it looks like nothing *else* has the files open.
Usually when these types of errors are reported on the mailing list,
it turns out to be due to some other program opening the file without
those flags.

It's also possible that this is a real permissions problem, and not a
sharing violation.  I'd definitely look into this feedback:

On Tue, Mar 9, 2021 at 11:19 PM Thomas Kellerer <shammat@gmx.net> wrote:
> The data directory should not be stored in "C:\Program File"s on Windows.
>
> I wouldn't be surprised if "Program Files" has some additional security settings that come into play here.
>
> %ProgramData% is a better location for the data directory.





^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-16 10:26  Michael Paquier <michael@paquier.xyz>
  parent: Andrus <kobruleht2@hot.ee>
  1 sibling, 1 reply; 34+ messages in thread

From: Michael Paquier @ 2021-03-16 10:26 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi Andrus,

On Wed, Mar 10, 2021 at 03:20:47PM +0200, Andrus wrote:
> After re-starting postgres service problem persists.

Where you getting the Postgres binaries from?  If we provide a patch,
could you test it?  This would require that you do your own build,
unfortunately, but having an environment where this is easily
reproducible is a key thing.
--
Michael

Attachments:

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

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-16 11:59  Andrus <kobruleht2@hot.ee>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 34+ messages in thread

From: Andrus @ 2021-03-16 11:59 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi
> Where you getting the Postgres binaries from?

https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

> If we provide a patch, could you test it?
Yes
> This would require that you do your own build,
> unfortunately, but having an environment where this is easily
> reproducible is a key thing.

I used C last time many years ago. I'm working in C# with Visual Studio 
2019.

I have two Windows 2019 servers. In Intel Xeon Cold 6226R server it 
occurs after every 10 seconds. Last logs:

2021-03-16 13:48:12 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000001100000097": Permission denied
2021-03-16 13:48:22 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000001100000098": Permission denied
2021-03-16 13:48:32 EET     checkpointer LOG:  could not rename file 
"pg_wal/000000010000001100000099": Permission denied
2021-03-16 13:48:42 EET     checkpointer LOG:  could not rename file 
"pg_wal/00000001000000110000009A": Permission denied
2021-03-16 13:48:52 EET     checkpointer LOG:  could not rename file 
"pg_wal/00000001000000110000009D": Permission denied
2021-03-16 13:49:02 EET     checkpointer LOG:  could not rename file 
"pg_wal/0000000100000011000000A0": Permission denied

In AMD Ryzen 3970X Threadripper 32 core processor server in also occurs 
many times per day day but less frequently. Last logs:

2021-03-16 13:45:20 EET     checkpointerLOG:  could not rename file 
"pg_wal/000000010000004E000000FB": Permission denied
2021-03-16 13:50:02 EET     checkpointerLOG:  could not rename file 
"pg_wal/000000010000004E000000FB": Permission denied
2021-03-16 13:50:13 EET     checkpointerLOG:  could not rename file 
"pg_wal/000000010000004F00000082": Permission denied

So It should be probably reproducible in any Windows 2019 server.

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-16 22:18  Michael Paquier <michael@paquier.xyz>
  parent: Andrus <kobruleht2@hot.ee>
  0 siblings, 1 reply; 34+ messages in thread

From: Michael Paquier @ 2021-03-16 22:18 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

On Tue, Mar 16, 2021 at 01:59:07PM +0200, Andrus wrote:
> I have two Windows 2019 servers. In Intel Xeon Cold 6226R server it occurs
> after every 10 seconds. Last logs:
> 
> 2021-03-16 13:48:12 EET     checkpointer LOG:  could not rename file
> "pg_wal/000000010000001100000097": Permission denied
> 2021-03-16 13:48:22 EET     checkpointer LOG:  could not rename file
> "pg_wal/000000010000001100000098": Permission denied
> 2021-03-16 13:48:32 EET     checkpointer LOG:  could not rename file
> "pg_wal/000000010000001100000099": Permission denied
> 2021-03-16 13:48:42 EET     checkpointer LOG:  could not rename file
> "pg_wal/00000001000000110000009A": Permission denied
> 2021-03-16 13:48:52 EET     checkpointer LOG:  could not rename file
> "pg_wal/00000001000000110000009D": Permission denied
> 2021-03-16 13:49:02 EET     checkpointer LOG:  could not rename file
> "pg_wal/0000000100000011000000A0": Permission denied
> 
> So It should be probably reproducible in any Windows 2019 server.

Those ten seconds are coming from RemoveXlogFile(), where pgrename()
loops 100 times for 100ms before giving up.  So something holding up
the file's handle prevents the removal to happen.  Attached is the
patch that should be tested, based on the suspected commit.  There are
actually two scenarios to worry about:
- Check that the code of 13.2 compiled manually is enough to see the
failure.
- Check that once the patch attached is applied makes the failure go
away.

I am trying on my side to reproduce the problem in a more reliable
way.  One thing I saw breaking in my setup is archive_command, where
it was not able to archive a segment with a simple copy, failing with
the same error as yours.

In one of those servers, do you have in pg_wal/ some files named
xlogtemp.N?  N is an integer that would be the PID of the process that
generated it.
--
Michael

Attachments:

0001-Revert-Remove-HAVE_WORKING_LINK.patch (text/x-diff, 5.3K) download From 961f9a03d4c27220c33e88402d5ef274424a0ab2 Mon Sep 17 00:00:00 2001 From: Michael Paquier <michael@paquier.xyz> Date: Wed, 17 Mar 2021 07:12:35 +0900 Subject: [PATCH] Revert "Remove HAVE_WORKING_LINK" This reverts commit aaa3aeddee51dd0058d38469907865052706a590. --- src/include/pg_config_manual.h | 7 +++++++ src/include/storage/fd.h | 2 +- src/backend/access/transam/timeline.c | 4 ++-- src/backend/access/transam/xlog.c | 4 ++-- src/backend/storage/file/fd.c | 21 ++++++++++++++++----- 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h index 8f3ec6bde1..966da99742 100644 --- a/src/include/pg_config_manual.h +++ b/src/include/pg_config_manual.h @@ -135,6 +135,13 @@ #define EXEC_BACKEND #endif +/* + * Define this if your operating system supports link() + */ +#if !defined(WIN32) && !defined(__CYGWIN__) +#define HAVE_WORKING_LINK 1 +#endif + /* * USE_POSIX_FADVISE controls whether Postgres will attempt to use the * posix_fadvise() kernel call. Usually the automatic configure tests are diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h index 8cd125d7df..2085c62b41 100644 --- a/src/include/storage/fd.h +++ b/src/include/storage/fd.h @@ -157,7 +157,7 @@ extern void fsync_fname(const char *fname, bool isdir); extern int fsync_fname_ext(const char *fname, bool isdir, bool ignore_perm, int elevel); extern int durable_rename(const char *oldfile, const char *newfile, int loglevel); extern int durable_unlink(const char *fname, int loglevel); -extern int durable_rename_excl(const char *oldfile, const char *newfile, int loglevel); +extern int durable_link_or_rename(const char *oldfile, const char *newfile, int loglevel); extern void SyncDataDirectory(void); extern int data_sync_elevel(int elevel); diff --git a/src/backend/access/transam/timeline.c b/src/backend/access/transam/timeline.c index e6a29d9a9b..27d70ff869 100644 --- a/src/backend/access/transam/timeline.c +++ b/src/backend/access/transam/timeline.c @@ -446,7 +446,7 @@ writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI, * Perform the rename using link if available, paranoidly trying to avoid * overwriting an existing file (there shouldn't be one). */ - durable_rename_excl(tmppath, path, ERROR); + durable_link_or_rename(tmppath, path, ERROR); /* The history file can be archived immediately. */ if (XLogArchivingActive()) @@ -524,7 +524,7 @@ writeTimeLineHistoryFile(TimeLineID tli, char *content, int size) * Perform the rename using link if available, paranoidly trying to avoid * overwriting an existing file (there shouldn't be one). */ - durable_rename_excl(tmppath, path, ERROR); + durable_link_or_rename(tmppath, path, ERROR); } /* diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 7daa7c43ad..82e070e431 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -3624,11 +3624,11 @@ InstallXLogFileSegment(XLogSegNo *segno, char *tmppath, * Perform the rename using link if available, paranoidly trying to avoid * overwriting an existing file (there shouldn't be one). */ - if (durable_rename_excl(tmppath, path, LOG) != 0) + if (durable_link_or_rename(tmppath, path, LOG) != 0) { if (use_lock) LWLockRelease(ControlFileLock); - /* durable_rename_excl already emitted log message */ + /* durable_link_or_rename already emitted log message */ return false; } diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index e5950b0726..ba92ceaf65 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -767,11 +767,10 @@ durable_unlink(const char *fname, int elevel) } /* - * durable_rename_excl -- rename a file in a durable manner, without - * overwriting an existing target file + * durable_link_or_rename -- rename a file in a durable manner. * - * Similar to durable_rename(), except that this routine will fail if the - * target file already exists. + * Similar to durable_rename(), except that this routine tries (but does not + * guarantee) not to overwrite the target file. * * Note that a crash in an unfortunate moment can leave you with two links to * the target file. @@ -782,7 +781,7 @@ durable_unlink(const char *fname, int elevel) * valid upon return. */ int -durable_rename_excl(const char *oldfile, const char *newfile, int elevel) +durable_link_or_rename(const char *oldfile, const char *newfile, int elevel) { /* * Ensure that, if we crash directly after the rename/link, a file with @@ -791,6 +790,7 @@ durable_rename_excl(const char *oldfile, const char *newfile, int elevel) if (fsync_fname_ext(oldfile, false, false, elevel) != 0) return -1; +#ifdef HAVE_WORKING_LINK if (link(oldfile, newfile) < 0) { ereport(elevel, @@ -800,6 +800,17 @@ durable_rename_excl(const char *oldfile, const char *newfile, int elevel) return -1; } unlink(oldfile); +#else + /* XXX: Add racy file existence check? */ + if (rename(oldfile, newfile) < 0) + { + ereport(elevel, + (errcode_for_file_access(), + errmsg("could not rename file \"%s\" to \"%s\": %m", + oldfile, newfile))); + return -1; + } +#endif /* * Make change persistent in case of an OS crash, both the new entry and -- 2.30.2
signature.asc (application/pgp-signature, 832B) download ^ permalink raw reply [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-16 23:09  Andrus <kobruleht2@hot.ee>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 2 replies; 34+ messages in thread

From: Andrus @ 2021-03-16 23:09 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi!

 >Those ten seconds are coming from RemoveXlogFile(), where pgrename()
> loops 100 times for 100ms before giving up.  So something holding up
> the file's handle prevents the removal to happen.

I tried sysinternals

handle pg_wal

It shows that only postgres processes have opened files in pg_wal directory:

postgres.exe       pid: 11800  type: File           CC0: C:\Program 
Files\PostgreSQL\13\data\pg_wal\0000000100000012000000B7
postgres.exe       pid: 11800  type: File          12B8: C:\Program 
Files\PostgreSQL\13\data\pg_wal
postgres.exe       pid: 23904  type: File          1134: C:\Program 
Files\PostgreSQL\13\data\pg_wal\0000000100000012000000B5
postgres.exe       pid: 20908  type: File           17C: C:\Program 
Files\PostgreSQL\13\data\pg_wal\0000000100000012000000B7
postgres.exe       pid: 29892  type: File           C08: C:\Program 
Files\PostgreSQL\13\data\pg_wal\0000000100000011000000F4
...
postgres.exe       pid: 34260  type: File           C18: C:\Program 
Files\PostgreSQL\13\data\pg_wal\0000000100000011000000FC
postgres.exe       pid: 34484  type: File           C48: C:\Program 
Files\PostgreSQL\13\data\pg_wal\0000000100000011000000FC
postgres.exe       pid: 38740  type: File           180: C:\Program 
Files\PostgreSQL\13\data\pg_wal\0000000100000012000000B7


> Attached is the
> patch that should be tested, based on the suspected commit.  There are
> actually two scenarios to worry about:
> - Check that the code of 13.2 compiled manually is enough to see the
> failure.
> - Check that once the patch attached is applied makes the failure go
> away.
>
Intel server has

PostgreSQL 13.1, compiled by Visual C++ build 1914, 64-bit

and AMD server

PostgreSQL 13.2, compiled by Visual C++ build 1914, 64-bit

Should I try install Visual C++ , compile and replace postgres.exe file 
in AMD server.

> I am trying on my side to reproduce the problem in a more reliable
> way.  One thing I saw breaking in my setup is archive_command, where
> it was not able to archive a segment with a simple copy, failing with
> the same error as yours.
wal archiving is not used on those servers.
> In one of those servers, do you have in pg_wal/ some files named
> xlogtemp.N?  N is an integer that would be the PID of the process that
> generated it.

No. Intel server has 4 files with .deleted extension. AMD server has no 
.deleted files. It has probably lower traffic.

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-16 23:41  Michael Paquier <michael@paquier.xyz>
  parent: Andrus <kobruleht2@hot.ee>
  1 sibling, 2 replies; 34+ messages in thread

From: Michael Paquier @ 2021-03-16 23:41 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

On Wed, Mar 17, 2021 at 01:09:24AM +0200, Andrus wrote:
> Should I try install Visual C++ , compile and replace postgres.exe file in
> AMD server.

Mostly.  That's the annoying part:
https://www.postgresql.org/docs/devel/install-windows-full.html

It is also possible to compile the code on a first machine, then just
zip followed by an unzip it at the same location as your installation.

I am not completely sure which flags your installation has, but
another possibility is that I directly send to you two compiled
builds, one with the patch and one without it that you could directly
test.  I would not send that to the lists as an installation is rather
large, but I could just send you links from where you could download
both of them.  Then you would just need to stop the Postgres service,
do a drop-in deplacement of the binaries, and start again the Postgres
service.
--
Michael

Attachments:

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

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 07:01  Andrus <kobruleht2@hot.ee>
  parent: Michael Paquier <michael@paquier.xyz>
  1 sibling, 0 replies; 34+ messages in thread

From: Andrus @ 2021-03-17 07:01 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi!

> I am not completely sure which flags your installation has, but
> another possibility is that I directly send to you two compiled
> builds, one with the patch and one without it that you could directly
> test.  I would not send that to the lists as an installation is rather
> large, but I could just send you links from where you could download
> both of them.  Then you would just need to stop the Postgres service,
> do a drop-in deplacement of the binaries, and start again the Postgres
> service.

I can try binaries in Intel server which runs Postgres 13.1. I hope its 
data directory is compatible with them.

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 07:25  Andrus <kobruleht2@hot.ee>
  parent: Michael Paquier <michael@paquier.xyz>
  1 sibling, 1 reply; 34+ messages in thread

From: Andrus @ 2021-03-17 07:25 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi

 >I am not completely sure which flags your installation has, but

pg_config --configure outputs

--enable-thread-safety --enable-nls --with-ldap --with-openssl 
--with-uuid --with-libxml --with-libxslt --with-icu --with-tcl 
--with-perl --with-python

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 08:24  Michael Paquier <michael@paquier.xyz>
  parent: Andrus <kobruleht2@hot.ee>
  0 siblings, 1 reply; 34+ messages in thread

From: Michael Paquier @ 2021-03-17 08:24 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

On Wed, Mar 17, 2021 at 09:25:00AM +0200, Andrus wrote:
> pg_config --configure outputs
> 
> --enable-thread-safety --enable-nls --with-ldap --with-openssl --with-uuid
> --with-libxml --with-libxslt --with-icu --with-tcl --with-perl --with-python

Thanks.  Do you actually use OpenSSL, LDAP, uuid-ossp, xml2, PL/Perl
PL/Python, or the XML datatype for your applications there?  It may be
better if those custom builds have a minimum number of dependencies 
filled, while still being compatible with what you do on those servers
so as they can still have some load applied.
--
Michael

Attachments:

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

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 08:45  Andrus <kobruleht2@hot.ee>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 34+ messages in thread

From: Andrus @ 2021-03-17 08:45 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general


 >On Wed, Mar 17, 2021 at 09:25:00AM +0200, Andrus wrote:
>> pg_config --configure outputs
>>
>> --enable-thread-safety --enable-nls --with-ldap --with-openssl --with-uuid
>> --with-libxml --with-libxslt --with-icu --with-tcl --with-perl --with-python
> Thanks.  Do you actually use OpenSSL,
Not directly. Maybe server uses it for ssl connections but non-ssl 
connections are also allowed.
>   LDAP
no.
> uuid-ossp,
It is used to get guid in few places for compatibility with older servers.
> xml2, PL/Perl PL/Python,
No.
> or the XML datatype

In this server hopefully no. Application code contains xml parsing it 
but probably those queries are never running in this server.

Andrus.

> for your applications there?  It may be
> better if those custom builds have a minimum number of dependencies
> filled, while still being compatible with what you do on those servers
> so as they can still have some load applied.
> --
> Michael

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 12:46  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Andrus <kobruleht2@hot.ee>
  1 sibling, 1 reply; 34+ messages in thread

From: Laurenz Albe @ 2021-03-17 12:46 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general

On Wed, 2021-03-17 at 01:09 +0200, Andrus wrote:
> > Those ten seconds are coming from RemoveXlogFile(), where pgrename() 
> > loops 100 times for 100ms before giving up.  So something holding up
> > the file's handle prevents the removal to happen.  
> 
> I tried sysinternals   
> 
> handle pg_wal 
> 
> It shows that only postgres processes have opened files in pg_wal directory:
> 
> postgres.exe       pid: 11800  type: File           CC0: C:\Program Files\PostgreSQL\13\data\pg_wal\0000000100000012000000B7
> postgres.exe       pid: 11800  type: File          12B8: C:\Program Files\PostgreSQL\13\data\pg_wal
> postgres.exe       pid: 23904  type: File          1134: C:\Program Files\PostgreSQL\13\data\pg_wal\0000000100000012000000B5
> postgres.exe       pid: 20908  type: File           17C: C:\Program Files\PostgreSQL\13\data\pg_wal\0000000100000012000000B7
> postgres.exe       pid: 29892  type: File           C08: C:\Program Files\PostgreSQL\13\data\pg_wal\0000000100000011000000F4
> ...
> postgres.exe       pid: 34260  type: File           C18: C:\Program Files\PostgreSQL\13\data\pg_wal\0000000100000011000000FC
> postgres.exe       pid: 34484  type: File           C48: C:\Program Files\PostgreSQL\13\data\pg_wal\0000000100000011000000FC
> postgres.exe       pid: 38740  type: File           180: C:\Program Files\PostgreSQL\13\data\pg_wal\0000000100000012000000B7

I think what it would be most helpful to run "process monitor", so that you get
a log of the system calls and errors; perhaps that shows some details that
we cannot get from the error message.

Yours,
Laurenz Albe






^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 13:26  Andrus <kobruleht2@hot.ee>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 2 replies; 34+ messages in thread

From: Andrus @ 2021-03-17 13:26 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general

Hi!


> I think what it would be most helpful to run "process monitor", so that you get
> a log of the system calls and errors; perhaps that shows some details that
> we cannot get from the error message.
>
Process monitor shows huge number of DELETE PENDING results from 
CreateFile operation:

15:22:35,1708187    postgres.exe    11800    CreateFile C:\Program 
Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B    DELETE 
PENDING    Desired Access: Read Attributes, Delete, Synchronize, 
Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse 
Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

15:22:35,2713856    postgres.exe    11800    CreateFile C:\Program 
Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B    DELETE 
PENDING    Desired Access: Read Attributes, Delete, Synchronize, 
Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse 
Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

15:22:35,3719483    postgres.exe    11800    CreateFile C:\Program 
Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B    DELETE 
PENDING    Desired Access: Read Attributes, Delete, Synchronize, 
Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse 
Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

15:22:35,4723624    postgres.exe    11800    CreateFile C:\Program 
Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B    DELETE 
PENDING    Desired Access: Read Attributes, Delete, Synchronize, 
Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse 
Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 14:48  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Andrus <kobruleht2@hot.ee>
  1 sibling, 2 replies; 34+ messages in thread

From: Laurenz Albe @ 2021-03-17 14:48 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general

On Wed, 2021-03-17 at 15:26 +0200, Andrus wrote:
> > I think what it would be most helpful to run "process monitor", so that you get
> > a log of the system calls and errors; perhaps that shows some details that
> > we cannot get from the error message.
> > 
> 
> Process monitor shows huge number of DELETE PENDING results from CreateFile operation:
> 
> 15:22:35,1708187    postgres.exe    11800    CreateFile    C:\Program Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B    DELETE PENDING    Desired Access: Read Attributes, Delete,
> Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
> 15:22:35,2713856    postgres.exe    11800    CreateFile    C:\Program Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B    DELETE PENDING    Desired Access: Read Attributes, Delete,
> Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
> 
> 15:22:35,3719483    postgres.exe    11800    CreateFile    C:\Program Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B    DELETE PENDING    Desired Access: Read Attributes, Delete,
> Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
> 
> 15:22:35,4723624    postgres.exe    11800    CreateFile    C:\Program Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B    DELETE PENDING    Desired Access: Read Attributes, Delete,
> Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

Doesn't look like these are error messages.

There should be error messages that correspond to the error messages you see in the PostgreSQL log.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 15:16  Andrus <kobruleht2@hot.ee>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  1 sibling, 0 replies; 34+ messages in thread

From: Andrus @ 2021-03-17 15:16 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general

Hi!
> Doesn't look like these are error messages.
>
> There should be error messages that correspond to the error messages you see in the PostgreSQL log.

I excluded SUCCESS and DELETE PENDING results and included pg_wal path 
and postgres.exe process.

Log file contains only few entries, BUFFER OVERFLOW and NAME NOT FOUND

17:07:09,9618758    postgres.exe    11800 QueryAllInformationFile    
C:\Program Files\PostgreSQL\13\data\pg_wal\000000010000001300000021    
BUFFER OVERFLOW    CreationTime: 16.03.2021 20:04:57, LastAccessTime: 
17.03.2021 16:58:43, LastWriteTime: 17.03.2021 16:58:43, ChangeTime: 
17.03.2021 16:58:43, FileAttributes: A, AllocationSize: 16 777 216, 
EndOfFile: 16 777 216, NumberOfLinks: 1, DeletePending: False, 
Directory: False, IndexNumber: 0x38100000009ffb4, EaSize: 0, Access: 
Read Attributes, Synchronize, Position: 0, Mode: Synchronous IO 
Non-Alert, AlignmentRequirement: Byte
17:07:09,9624993    postgres.exe    11800 QueryAllInformationFile    
C:\Program Files\PostgreSQL\13\data\pg_wal\000000010000001300000023    
BUFFER OVERFLOW    CreationTime: 16.03.2021 20:04:57, LastAccessTime: 
17.03.2021 17:07:09, LastWriteTime: 17.03.2021 17:07:09, ChangeTime: 
17.03.2021 17:07:09, FileAttributes: A, AllocationSize: 16 777 216, 
EndOfFile: 16 777 216, NumberOfLinks: 1, DeletePending: False, 
Directory: False, IndexNumber: 0x20000000a010c, EaSize: 0, Access: Read 
Attributes, Synchronize, Position: 0, Mode: Synchronous IO Non-Alert, 
AlignmentRequirement: Byte
17:07:09,9630741    postgres.exe    11800 QueryAllInformationFile    
C:\Program Files\PostgreSQL\13\data\pg_wal\000000010000001300000024    
BUFFER OVERFLOW    CreationTime: 16.03.2021 20:04:57, LastAccessTime: 
16.03.2021 20:05:12, LastWriteTime: 16.03.2021 20:05:12, ChangeTime: 
16.03.2021 20:15:24, FileAttributes: A, AllocationSize: 16 777 216, 
EndOfFile: 16 777 216, NumberOfLinks: 1, DeletePending: False, 
Directory: False, IndexNumber: 0x20000000a010d, EaSize: 0, Access: Read 
Attributes, Synchronize, Position: 0, Mode: Synchronous IO Non-Alert, 
AlignmentRequirement: Byte
17:07:09,9636100    postgres.exe    11800 QueryAllInformationFile    
C:\Program Files\PostgreSQL\13\data\pg_wal\000000010000001300000025    
BUFFER OVERFLOW    CreationTime: 16.03.2021 20:04:57, LastAccessTime: 
16.03.2021 20:05:12, LastWriteTime: 16.03.2021 20:05:12, ChangeTime: 
16.03.2021 20:15:24, FileAttributes: A, AllocationSize: 16 777 216, 
EndOfFile: 16 777 216, NumberOfLinks: 1, DeletePending: False, 
Directory: False, IndexNumber: 0x20000000a010e, EaSize: 0, Access: Read 
Attributes, Synchronize, Position: 0, Mode: Synchronous IO Non-Alert, 
AlignmentRequirement: Byte
17:07:09,9641594    postgres.exe    11800 QueryAllInformationFile    
C:\Program Files\PostgreSQL\13\data\pg_wal\000000010000001300000026    
BUFFER OVERFLOW    CreationTime: 16.03.2021 20:04:57, LastAccessTime: 
16.03.2021 20:05:13, LastWriteTime: 16.03.2021 20:05:13, ChangeTime: 
16.03.2021 20:15:24, FileAttributes: A, AllocationSize: 16 777 216, 
EndOfFile: 16 777 216, NumberOfLinks: 1, DeletePending: False, 
Directory: False, IndexNumber: 0x20000000a010f, EaSize: 0, Access: Read 
Attributes, Synchronize, Position: 0, Mode: Synchronous IO Non-Alert, 
AlignmentRequirement: Byte
17:07:09,9659048    postgres.exe    11800    CreateFile C:\Program 
Files\PostgreSQL\13\data\pg_wal    IS DIRECTORY Desired Access: Generic 
Read, Disposition: Open, Options: Synchronous IO Non-Alert, 
Non-Directory File, Attributes: N, ShareMode: Read, Write, Delete, 
AllocationSize: n/a
17:07:09,9661026    postgres.exe    11800 QueryAllInformationFile    
C:\Program Files\PostgreSQL\13\data\pg_wal    BUFFER OVERFLOW 
CreationTime: 10.02.2021 14:07:18, LastAccessTime: 17.03.2021 17:07:09, 
LastWriteTime: 17.03.2021 17:07:09, ChangeTime: 17.03.2021 17:07:09, 
FileAttributes: D, AllocationSize: 196 608, EndOfFile: 196 608, 
NumberOfLinks: 1, DeletePending: False, Directory: True, IndexNumber: 
0x1000000055e2b, EaSize: 0, Access: Read Attributes, Synchronize, 
Position: 0, Mode: Synchronous IO Non-Alert, AlignmentRequirement: Byte
17:07:09,9666396    postgres.exe    11800    CreateFile C:\Program 
Files\PostgreSQL\13\data\pg_wal\archive_status\000000010000001300000021.done 
NAME NOT FOUND    Desired Access: Read Attributes, Delete, Disposition: 
Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, 
ShareMode: Read, Write, Delete, AllocationSize: n/a
17:07:09,9667813    postgres.exe    11800    CreateFile C:\Program 
Files\PostgreSQL\13\data\pg_wal\archive_status\000000010000001300000021.ready 
NAME NOT FOUND    Desired Access: Read Attributes, Delete, Disposition: 
Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, 
ShareMode: Read, Write, Delete, AllocationSize: n/a
17:07:09,9668956    postgres.exe    11800    QueryDirectory C:\Program 
Files\PostgreSQL\13\data\pg_wal    NO MORE FILES FileInformationClass: 
FileBothDirectoryInformation

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 15:24  Andrus <kobruleht2@hot.ee>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  1 sibling, 1 reply; 34+ messages in thread

From: Andrus @ 2021-03-17 15:24 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general

Hi!

BUFFER OVERFLOW result stack trace is

"Frame","Module","Location","Address","Path"
"0","FLTMGR.SYS","FltDecodeParameters + 
0x1c5d","0xfffff8019f72555d","C:\Windows\System32\drivers\FLTMGR.SYS"
"1","FLTMGR.SYS","FltDecodeParameters + 
0x17bc","0xfffff8019f7250bc","C:\Windows\System32\drivers\FLTMGR.SYS"
"2","FLTMGR.SYS","FltDecodeParameters + 
0x1328","0xfffff8019f724c28","C:\Windows\System32\drivers\FLTMGR.SYS"
"3","FLTMGR.SYS","FltDecodeParameters + 
0x111e","0xfffff8019f724a1e","C:\Windows\System32\drivers\FLTMGR.SYS"
"4","ntoskrnl.exe","IofCallDriver + 
0x59","0xfffff80051856109","C:\Windows\system32\ntoskrnl.exe"
"5","ntoskrnl.exe","KeIsAttachedProcess + 
0xf3","0xfffff80051929343","C:\Windows\system32\ntoskrnl.exe"
"6","ntoskrnl.exe","NtQueryInformationFile + 
0x492","0xfffff80051e8b5c2","C:\Windows\system32\ntoskrnl.exe"
"7","ntoskrnl.exe","setjmpex + 
0x7905","0xfffff800519e6705","C:\Windows\system32\ntoskrnl.exe"
"8","<unknown>","0x7ffc7a17f9e4","0x7ffc7a17f9e4",""
"9","<unknown>","0x7ffc7639af04","0x7ffc7639af04",""
"10","<unknown>","0x7ffc7728fe86","0x7ffc7728fe86",""
"11","<unknown>","0x7ffc7728f622","0x7ffc7728f622",""
"12","<unknown>","0x7ffc77290a46","0x7ffc77290a46",""
"13","<unknown>","0x14048ccca","0x14048ccca",""
"14","<unknown>","0x14009463b","0x14009463b",""
"15","<unknown>","0x140094365","0x140094365",""
"16","<unknown>","0x14008e541","0x14008e541",""
"17","<unknown>","0x140286f46","0x140286f46",""
"18","<unknown>","0x1400a17ca","0x1400a17ca",""
"19","<unknown>","0x1402923cb","0x1402923cb",""
"20","<unknown>","0x1401b95c0","0x1401b95c0",""
"21","<unknown>","0x14049f304","0x14049f304",""
"22","<unknown>","0x7ffc77bb7974","0x7ffc77bb7974",""
"23","<unknown>","0x7ffc7a13a2d1","0x7ffc7a13a2d1",""

It looks like too small buffer is passed to NtQueryInformationFile .

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 15:44  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Andrus <kobruleht2@hot.ee>
  0 siblings, 1 reply; 34+ messages in thread

From: Tom Lane @ 2021-03-17 15:44 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; pgsql-general

Andrus <kobruleht2@hot.ee> writes:
> It looks like too small buffer is passed to NtQueryInformationFile .

Oh!  That's an interesting theory; it'd explain why this broke recently,
because we didn't use to use that function.  But how do you draw that
conclusion from this stack trace?

Anyway, if you've diagnosed this correctly, I bet the fault is in
this bit in win32stat.c:

#if _WIN32_WINNT < 0x0600
	IO_STATUS_BLOCK ioStatus;
	FILE_STANDARD_INFORMATION standardInfo;
#else
	FILE_STANDARD_INFO standardInfo;
#endif

Maybe the version cutoff is wrong?  Maybe we have to do this with
a run-time version check, instead of statically compiling it?

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 21:00  Michael Paquier <michael@paquier.xyz>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 34+ messages in thread

From: Michael Paquier @ 2021-03-17 21:00 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrus <kobruleht2@hot.ee>; Laurenz Albe <laurenz.albe@cybertec.at>; Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; pgsql-general

On Wed, Mar 17, 2021 at 11:44:48AM -0400, Tom Lane wrote:
> Oh!  That's an interesting theory; it'd explain why this broke recently,
> because we didn't use to use that function.  But how do you draw that
> conclusion from this stack trace?
> 
> Anyway, if you've diagnosed this correctly, I bet the fault is in
> this bit in win32stat.c:
> 
> #if _WIN32_WINNT < 0x0600
> 	IO_STATUS_BLOCK ioStatus;
> 	FILE_STANDARD_INFORMATION standardInfo;
> #else
> 	FILE_STANDARD_INFO standardInfo;
> #endif
> 
> Maybe the version cutoff is wrong?  Maybe we have to do this with
> a run-time version check, instead of statically compiling it?

All the reports received are on 13.1 and 13.2.  This code is new as of
bed9075, no?
--
Michael

Attachments:

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

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 21:07  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 34+ messages in thread

From: Tom Lane @ 2021-03-17 21:07 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Andrus <kobruleht2@hot.ee>; Laurenz Albe <laurenz.albe@cybertec.at>; Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; pgsql-general

Michael Paquier <michael@paquier.xyz> writes:
> On Wed, Mar 17, 2021 at 11:44:48AM -0400, Tom Lane wrote:
>> Oh!  That's an interesting theory; it'd explain why this broke recently,
>> because we didn't use to use that function.  But how do you draw that
>> conclusion from this stack trace?

> All the reports received are on 13.1 and 13.2.  This code is new as of
> bed9075, no?

Ah, right.  But then this theory must be nonsense, because we did
not use NtQueryInformationFile() in v13.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 23:25  Guy Burgess <guy@burgess.co.nz>
  parent: Andrus <kobruleht2@hot.ee>
  1 sibling, 1 reply; 34+ messages in thread

From: Guy Burgess @ 2021-03-17 23:25 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; Laurenz Albe <laurenz.albe@cybertec.at>; Michael Paquier <michael@paquier.xyz>; pgsql-general; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>

FWIW, this looks the same issue I am getting (reported last month: 
https://www.postgresql.org/message-id/f444a84e-2d29-55f9-51a6-a5dcea3bc253%40burgess.co.nz)

I get the same Process Monitor output, including BUFFER OVERFLOW 
entries.  No sign of any process other than postgres.exe touching the 
WAL files.

Regards,

Guy


On 18/03/2021 2:26 am, Andrus wrote:
>
> Hi!
>
>
>> I think what it would be most helpful to run "process monitor", so that you get
>> a log of the system calls and errors; perhaps that shows some details that
>> we cannot get from the error message.
>>
> Process monitor shows huge number of DELETE PENDING results from 
> CreateFile operation:
>
> 15:22:35,1708187    postgres.exe    11800    CreateFile C:\Program 
> Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B    DELETE 
> PENDING    Desired Access: Read Attributes, Delete, Synchronize, 
> Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse 
> Point, Attributes: n/a, ShareMode: Read, Write, Delete, 
> AllocationSize: n/a
>
> 15:22:35,2713856    postgres.exe    11800    CreateFile C:\Program 
> Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B DELETE 
> PENDING    Desired Access: Read Attributes, Delete, Synchronize, 
> Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse 
> Point, Attributes: n/a, ShareMode: Read, Write, Delete, 
> AllocationSize: n/a
>
> 15:22:35,3719483    postgres.exe    11800    CreateFile C:\Program 
> Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B DELETE 
> PENDING    Desired Access: Read Attributes, Delete, Synchronize, 
> Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse 
> Point, Attributes: n/a, ShareMode: Read, Write, Delete, 
> AllocationSize: n/a
>
> 15:22:35,4723624    postgres.exe    11800    CreateFile C:\Program 
> Files\PostgreSQL\13\data\pg_wal\00000001000000110000003B DELETE 
> PENDING    Desired Access: Read Attributes, Delete, Synchronize, 
> Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse 
> Point, Attributes: n/a, ShareMode: Read, Write, Delete, 
> AllocationSize: n/a
>
> Andrus.
>
>





^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-17 23:53  Michael Paquier <michael@paquier.xyz>
  parent: Andrus <kobruleht2@hot.ee>
  0 siblings, 1 reply; 34+ messages in thread

From: Michael Paquier @ 2021-03-17 23:53 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

On Wed, Mar 17, 2021 at 10:45:28AM +0200, Andrus wrote:
> In this server hopefully no. Application code contains xml parsing it but
> probably those queries are never running in this server.

Okay, cool.  I am going to send you privately two links to the builds
I am going to produce, 13.2 unpatched and 13.2 patched.
--
Michael

Attachments:

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

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-18 00:08  Michael Paquier <michael@paquier.xyz>
  parent: Guy Burgess <guy@burgess.co.nz>
  0 siblings, 1 reply; 34+ messages in thread

From: Michael Paquier @ 2021-03-18 00:08 UTC (permalink / raw)
  To: Guy Burgess <guy@burgess.co.nz>; +Cc: Andrus <kobruleht2@hot.ee>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general; Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>

On Thu, Mar 18, 2021 at 12:25:45PM +1300, Guy Burgess wrote:
> FWIW, this looks the same issue I am getting (reported last month:
> https://www.postgresql.org/message-id/f444a84e-2d29-55f9-51a6-a5dcea3bc253%40burgess.co.nz)

Yep.

> I get the same Process Monitor output, including BUFFER OVERFLOW entries.
> No sign of any process other than postgres.exe touching the WAL files.

Guy, do you have an environment where this is still happening and
where you could test a potential fix?  We are not sure yet what's
causing that, but one code path has changed in this area, involving
CreateHardLinkA()+_unlink() instead of a single rename when attempting
to recycle a segment.  And I am just in a mood to build things by
myself and send some links to people to be able to download and test
that, so one more is fine..
--
Michael

Attachments:

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

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-18 00:19  Guy Burgess <guy@burgess.co.nz>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 34+ messages in thread

From: Guy Burgess @ 2021-03-18 00:19 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Andrus <kobruleht2@hot.ee>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general; Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>

Thanks - yes pleas send me a private link and I will try to reproduce it 
in a test environment and then test the patch.

Regards,

Guy


On 18/03/2021 1:08 pm, Michael Paquier wrote:
> On Thu, Mar 18, 2021 at 12:25:45PM +1300, Guy Burgess wrote:
>> FWIW, this looks the same issue I am getting (reported last month:
>> https://www.postgresql.org/message-id/f444a84e-2d29-55f9-51a6-a5dcea3bc253%40burgess.co.nz)
> Yep.
>
>> I get the same Process Monitor output, including BUFFER OVERFLOW entries.
>> No sign of any process other than postgres.exe touching the WAL files.
> Guy, do you have an environment where this is still happening and
> where you could test a potential fix?  We are not sure yet what's
> causing that, but one code path has changed in this area, involving
> CreateHardLinkA()+_unlink() instead of a single rename when attempting
> to recycle a segment.  And I am just in a mood to build things by
> myself and send some links to people to be able to download and test
> that, so one more is fine..
> --
> Michael





^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-19 07:00  Andrus <kobruleht2@hot.ee>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 34+ messages in thread

From: Andrus @ 2021-03-19 07:00 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi!


> Okay, cool.  I am going to send you privately two links to the builds
> I am going to produce, 13.2 unpatched and 13.2 patched.

I replaced files in 13.1 server with ones from your patched version. 
There are no errors in log file now for 8 hours.

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-19 07:06  Michael Paquier <michael@paquier.xyz>
  parent: Andrus <kobruleht2@hot.ee>
  0 siblings, 3 replies; 34+ messages in thread

From: Michael Paquier @ 2021-03-19 07:06 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

On Fri, Mar 19, 2021 at 09:00:10AM +0200, Andrus wrote:
> I replaced files in 13.1 server with ones from your patched version. There
> are no errors in log file now for 8 hours.

Yippee.  Thanks.

Have you tested the unpatched builds?  And did you see some errors
with them?
--
Michael

Attachments:

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

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-19 07:56  Andrus <kobruleht2@hot.ee>
  parent: Michael Paquier <michael@paquier.xyz>
  2 siblings, 0 replies; 34+ messages in thread

From: Andrus @ 2021-03-19 07:56 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi!


> Have you tested the unpatched builds?

No.

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-20 21:38  Andrus <kobruleht2@hot.ee>
  parent: Michael Paquier <michael@paquier.xyz>
  2 siblings, 0 replies; 34+ messages in thread

From: Andrus @ 2021-03-20 21:38 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi!

Today got 2 errors in patched version:

2021-03-20 20:31:27 EET     stats collector LOG:  could not rename 
temporary statistics file "pg_stat_tmp/global.tmp" to 
"pg_stat_tmp/global.stat": Permission denied

2021-03-20 20:51:25 EET     stats collector LOG:  could not rename 
temporary statistics file "pg_stat_tmp/global.tmp" to 
"pg_stat_tmp/global.stat": Permission denied

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-22 07:25  Andrus <kobruleht2@hot.ee>
  parent: Michael Paquier <michael@paquier.xyz>
  2 siblings, 1 reply; 34+ messages in thread

From: Andrus @ 2021-03-22 07:25 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

Hi!

Errors in pg_wal directory seems not to occur in patched version. Errors 
in pg_stat_tmp still occur. Yesterdays log introduces new error message

using stale statistics instead of current ones because stats collector 
is not responding

2021-03-21 03:02:23 EET     stats collector LOG:  could not rename 
temporary statistics file "pg_stat_tmp/global.tmp" to 
"pg_stat_tmp/global.stat": Permission denied
2021-03-21 13:31:00 EET     stats collector LOG:  could not rename 
temporary statistics file "pg_stat_tmp/global.tmp" to 
"pg_stat_tmp/global.stat": Permission denied
2021-03-21 15:15:52 EET     stats collector LOG:  could not rename 
temporary statistics file "pg_stat_tmp/global.tmp" to 
"pg_stat_tmp/global.stat": Permission denied
2021-03-21 23:51:20 EET     stats collector LOG:  could not rename 
temporary statistics file "pg_stat_tmp/global.tmp" to 
"pg_stat_tmp/global.stat": Permission denied
2021-03-21 23:51:25 EET     autovacuum worker LOG:  using stale 
statistics instead of current ones because stats collector is not responding

Andrus.

^ permalink  raw  reply  [nested|flat] 34+ messages in thread

* Re: SV: Log files polluted with permission denied error messages after every 10 seconds
@ 2021-03-22 07:44  Michael Paquier <michael@paquier.xyz>
  parent: Andrus <kobruleht2@hot.ee>
  0 siblings, 0 replies; 34+ messages in thread

From: Michael Paquier @ 2021-03-22 07:44 UTC (permalink / raw)
  To: Andrus <kobruleht2@hot.ee>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Niels Jespersen <NJN@dst.dk>; Tom Lane <tgl@sss.pgh.pa.us>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-general

On Mon, Mar 22, 2021 at 09:25:26AM +0200, Andrus wrote:
> Errors in pg_wal directory seems not to occur in patched version. Errors in
> pg_stat_tmp still occur. Yesterdays log introduces new error message
> 
> using stale statistics instead of current ones because stats collector is
> not responding
> 
> 2021-03-21 23:51:25 EET     autovacuum worker LOG:  using stale statistics
> instead of current ones because stats collector is not responding

The renaming of stats files involves just pgrename(), which is a
completely separate code path than the one of the WAL segments.  This
requires a separate investigation.
--
Michael

Attachments:

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

^ permalink  raw  reply  [nested|flat] 34+ messages in thread


end of thread, other threads:[~2021-03-22 07:44 UTC | newest]

Thread overview: 34+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 05:03 SV: Log files polluted with permission denied error messages after every 10 seconds Niels Jespersen <NJN@dst.dk>
2021-03-09 08:43 ` Andrus <kobruleht2@hot.ee>
2021-03-09 10:07   ` Thomas Munro <thomas.munro@gmail.com>
2021-03-09 16:24     ` Andrus <kobruleht2@hot.ee>
2021-03-10 09:10       ` Andrus <kobruleht2@hot.ee>
2021-03-10 13:20         ` Andrus <kobruleht2@hot.ee>
2021-03-12 01:27           ` Thomas Munro <thomas.munro@gmail.com>
2021-03-16 10:26           ` Michael Paquier <michael@paquier.xyz>
2021-03-16 11:59             ` Andrus <kobruleht2@hot.ee>
2021-03-16 22:18               ` Michael Paquier <michael@paquier.xyz>
2021-03-16 23:09                 ` Andrus <kobruleht2@hot.ee>
2021-03-16 23:41                   ` Michael Paquier <michael@paquier.xyz>
2021-03-17 07:01                     ` Andrus <kobruleht2@hot.ee>
2021-03-17 07:25                     ` Andrus <kobruleht2@hot.ee>
2021-03-17 08:24                       ` Michael Paquier <michael@paquier.xyz>
2021-03-17 08:45                         ` Andrus <kobruleht2@hot.ee>
2021-03-17 23:53                           ` Michael Paquier <michael@paquier.xyz>
2021-03-19 07:00                             ` Andrus <kobruleht2@hot.ee>
2021-03-19 07:06                               ` Michael Paquier <michael@paquier.xyz>
2021-03-19 07:56                                 ` Andrus <kobruleht2@hot.ee>
2021-03-20 21:38                                 ` Andrus <kobruleht2@hot.ee>
2021-03-22 07:25                                 ` Andrus <kobruleht2@hot.ee>
2021-03-22 07:44                                   ` Michael Paquier <michael@paquier.xyz>
2021-03-17 12:46                   ` Laurenz Albe <laurenz.albe@cybertec.at>
2021-03-17 13:26                     ` Andrus <kobruleht2@hot.ee>
2021-03-17 14:48                       ` Laurenz Albe <laurenz.albe@cybertec.at>
2021-03-17 15:16                         ` Andrus <kobruleht2@hot.ee>
2021-03-17 15:24                         ` Andrus <kobruleht2@hot.ee>
2021-03-17 15:44                           ` Tom Lane <tgl@sss.pgh.pa.us>
2021-03-17 21:00                             ` Michael Paquier <michael@paquier.xyz>
2021-03-17 21:07                               ` Tom Lane <tgl@sss.pgh.pa.us>
2021-03-17 23:25                       ` Guy Burgess <guy@burgess.co.nz>
2021-03-18 00:08                         ` Michael Paquier <michael@paquier.xyz>
2021-03-18 00:19                           ` Guy Burgess <guy@burgess.co.nz>

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