From: Andrus <kobruleht2@hot.ee>
To: Thomas Munro <thomas.munro@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Log files polluted with permission denied error messages after every 10 seconds
Date: Tue, 9 Mar 2021 00:01:20 +0200
Message-ID: <073ce1f0-689e-2ca8-1dbf-288b3be617ed@hot.ee> (raw)
In-Reply-To: <CA+hUKGLprgytAo1UfnGPP8sC9+cohTLMRW_o4zPXFSo-COa-Vg@mail.gmail.com>
References: <3861ff1e-0923-7838-e826-094cc9bef737@hot.ee>
<676dc946300076e60d6af455ac1bfa489fbbdd8b.camel@cybertec.at>
<97e00b3b-9357-4386-d4bd-b9128e4b8924@hot.ee>
<YELcpyM5Nc1H7L2m@paquier.xyz>
<CA+hUKGLprgytAo1UfnGPP8sC9+cohTLMRW_o4zPXFSo-COa-Vg@mail.gmail.com>
> Another thought: if it's not a sharing violation, I wonder if we
> should consider dumping more raw Windows error information in the
> messages we log, because, if I recall correctly, we're converting many
> Windows error codes into few Unix-style error numbers and thereby
> throwing away valuable clues. It makes it a bit more confusing when
> trying to ask a Windows expert what might be happening.
Knowing process name holding file and other detailed information would
be very useful.
In other Win 2019 server/Postgres 13 excluding Postgres drive from
fprot scan seems to decrease those errors.
However they still occur even if no fprot is active.
There are also regular stat errors in windows servers is size queries like
ERROR: could not stat file "base/45010/172654232": Permission denied;
in query
SELECT pg_size_pretty(pg_database_size('eeva')::bigint)::char(10) as size
and
ERROR: could not stat file "base/45010/172654232": Permission denied;
in query
SELECT
pg_catalog.pg_size_pretty(SUM(
CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')
THEN pg_catalog.pg_database_size(d.datname)
ELSE 0
END)::bigint) ::char(50) AS SIZE
FROM pg_catalog.pg_database d
and
ERROR: could not stat file "base/45010/172654232": Permission
denied;Error while executing the query
SELECT d.datname::char(15),
pg_catalog.pg_get_userbyid(d.datdba)::char(18) AS Owner,
CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')
THEN
pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname)::bigint)
ELSE 'No Access'
END::char(50) AS SIZE
FROM pg_catalog.pg_database d
ORDER BY
CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')
THEN pg_catalog.pg_database_size(d.datname)
ELSE NULL
END DESC -- nulls first
Andrus.
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-general@postgresql.org
Cc: kobruleht2@hot.ee, thomas.munro@gmail.com, michael@paquier.xyz, laurenz.albe@cybertec.at
Subject: Re: Log files polluted with permission denied error messages after every 10 seconds
In-Reply-To: <073ce1f0-689e-2ca8-1dbf-288b3be617ed@hot.ee>
References: <3861ff1e-0923-7838-e826-094cc9bef737@hot.ee> <676dc946300076e60d6af455ac1bfa489fbbdd8b.camel@cybertec.at> <97e00b3b-9357-4386-d4bd-b9128e4b8924@hot.ee> <YELcpyM5Nc1H7L2m@paquier.xyz> <CA+hUKGLprgytAo1UfnGPP8sC9+cohTLMRW_o4zPXFSo-COa-Vg@mail.gmail.com> <073ce1f0-689e-2ca8-1dbf-288b3be617ed@hot.ee>
* 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