From: Andrus <kobruleht2@hot.ee>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: How to get previous log file
Date: Sun, 28 Jun 2020 12:42:23 +0300
Message-ID: <7F15982900DB4EC0A233213D0ED79C70@dell2> (raw)
Hi!
select pg_read_file(pg_current_logfile())
retrieves today log file.
Log files are in log directory:
/var/lib/postgresql/12/main/log# ls
...
postgresql-2020-06-08_000000.log postgresql-2020-06-18_000000.log postgresql-2020-06-28_000000.log
postgresql-2020-06-09_000000.log postgresql-2020-06-19_000000.log
How get yesterday log file from remote client application using postgresql query ?
Using Postgres 12 in Debian.
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
Subject: Re: How to get previous log file
In-Reply-To: <7F15982900DB4EC0A233213D0ED79C70@dell2>
References: <7F15982900DB4EC0A233213D0ED79C70@dell2>
* 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