From: | RECHTÉ Marc <marc(dot)rechte(at)meteo(dot)fr> |
---|---|
To: | Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com> |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Inconsitancies in pg_stat_bgwriter and pg_stat_database returned values |
Date: | 2020-09-17 11:02:09 |
Message-ID: | 774919352.9027167.1600340529424.JavaMail.zimbra@meteo.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
----- Mail original -----
De: "Jehan-Guillaume de Rorthais" <jgdr(at)dalibo(dot)com>
À: "RECHTÉ Marc" <marc(dot)rechte(at)meteo(dot)fr>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Envoyé: Jeudi 17 Septembre 2020 09:39:44
Objet: Re: Inconsitancies in pg_stat_bgwriter and pg_stat_database returned values
On Thu, 17 Sep 2020 08:38:10 +0200 (CEST)
RECHTÉ Marc <marc(dot)rechte(at)meteo(dot)fr> wrote:
[...]
> The full row are different in your example, not just a few fields. It looks
> like mixed values from different instance.
>
> Could you share some more informations about the context and how to reproduce
> it?
>
> Regards,
>
> Hello
>
> Thanks a lot, you got it right: there are 2 instances on this machine and
> they are both configured with:
>
> stats_temp_directory = '/dev/shm'
>
> We some time ago tried, stats_temp_directory = '/dev/shm/instance', but
> PostgreSQL ignored the subdirectory part and kept creating the temp file at
> the FS root. As this is a temporary FS, one cannot in advance create the
> instance subdirectory as it is wiped out between reboots.
Use "/var/run/postgresql/instance_name" and setup systemd tmpfiles to create
the folder automatically. Eg.:
cat <<EOF > /etc/tmpfiles.d/postgresql-stats.conf
# Directory for PostgreSQL temp stat files
d /var/run/postgresql/stats-instance_name 0700 postgres postgres - -
EOF
You can add as many folders as you need.
To take this file in consideration immediately without rebooting the server,
run the following command:
systemd-tmpfiles --create /etc/tmpfiles.d/postgresql-stats.conf
Regards,
I applied your suggestions. Thanks again.
Marc.
From | Date | Subject | |
---|---|---|---|
Next Message | Juan José Santamaría Flecha | 2020-09-17 15:16:15 | Re: BUG #15858: could not stat file - over 4GB |
Previous Message | Michael Paquier | 2020-09-17 07:45:56 | Re: BUG #15858: could not stat file - over 4GB |