Re: Why log_statement may not work for a particular database? - Mailing list pgsql-admin

From Jeff Janes
Subject Re: Why log_statement may not work for a particular database?
Date
Msg-id CAMkU=1yCLQvZcd=grR98qjbrxZiY=8Ue7W3UtC2g779Lro7mAQ@mail.gmail.com
Whole thread Raw
In response to Why log_statement may not work for a particular database?  (Андрей Платонов <poluandrey@gmail.com>)
List pgsql-admin
On Fri, Jun 23, 2023 at 3:38 AM Андрей Платонов <poluandrey@gmail.com> wrote:

As I understand settings above should lead to the fact that I should
see statement logging for all databases into `stderr` (in fact into
journald),

How does it get from stderr to journald?  Maybe the messages for other databases are getting filtered out after PostgreSQL generates them.  Maybe you could bypass journald for now while you investigate, just to rule out non-PostgreSQL related possibilities.  Or "set client_min_messages TO log" so that your client gets sent copies of log messages directly.
 

I also checked the settings of the `mydatabase`
```
mydatabase=# SELECT name, setting FROM pg_settings WHERE name LIKE '%log%';

This only checks the settings of a particular connection.  Did you use this same connection to issue statements that should have been logged?  Maybe a stupid question, but how do you know anything loggable is happening?  Maybe you don't see messages because nobody does stuff in that database which would generate them.

Cheers,

Jeff

pgsql-admin by date:

Previous
From: Ron
Date:
Subject: Re: Postgresql Database cant start after restore using pgBackRest
Next
From: David Steele
Date:
Subject: Re: Postgresql Database cant start after restore using pgBackRest