Set a specific database to log_statement='ddl' but others to be log_statement='all'

From: Abdul Qoyyuum <aqoyyuum(at)cardaccess(dot)com(dot)au>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Set a specific database to log_statement='ddl' but others to be log_statement='all'
Date: 2021-02-16 03:06:39
Message-ID: CAA3DN=Vf9y=K9VB9iFqAHhqejJU__r0VeU2KJm2tgQaWnbPBbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I have a Postgresql cluster with master and multiple slaves running on
version 9.6. I'm trying to adjust the log_statement from all to ddl on
specific databases (i.e. postgresql.conf has log_statement='all' but I need
a couple of databases set to log_statement='ddl').

etx_ecom=# ALTER DATABASE etx_ecom SET log_statement='ddl';
ALTER DATABASE
etx_ecom=# show log_statement;
log_statement
---------------
all
(1 row)

etx_ecom=# INSERT into card_type VALUES('Q','TEST');
INSERT 0 1

etx_ecom=#

Feb 16 10:56:11 db1 postgres[21682]: [3602-1] <myusername(at)[local]->etx_ecom>
LOG: statement: INSERT into card_type VALUES('Q','TEST');

Why doesn't the Alter Database work?

--
Abdul Qoyyuum Bin Haji Abdul Kadir
HP No: +673 720 8043

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2021-02-16 03:15:41 Re: Why is Postgres only using 8 cores for partitioned count? [Parallel Append]
Previous Message H 2021-02-16 01:25:42 Issue initializing postgreSQL 13 on CentOS 7 docker