Re: some log statements ignored - Mailing list pgsql-general

From brian
Subject Re: some log statements ignored
Date
Msg-id 452FC305.3080303@zijn-digital.com
Whole thread Raw
In response to Re: some log statements ignored  (Bruce Momjian <bruce@momjian.us>)
Responses Re: some log statements ignored
List pgsql-general
Bruce Momjian wrote:
> brian wrote:
>
>>I changed my postgresql.conf to have:
>>
>>log_statement = mod
>>
>>It appears to be working, though not logging *all* INSERTs. For
>>instance, I have a PHP class that inserts into two tables in a
>>transaction. The log shows the first, but not the second. Has anyone
>>seen this behaviour?
>>
>>
>>test=# show log_statement;
>>  log_statement
>>---------------
>>  mod
>>(1 row)
>
>
> I have no idea why that would happen.  If you do 'all' do you see all of
> them?
>

Sorry--i hadn't had time to run a test. Setting it to 'all' works fine,
and i think i see the problem: the second INSERT is in a prepared
statement, so it's not being logged.

PREPARE mdb2_statement_pgsql00fb05c2c509aa2608b68bf2b87693a2 AS INSERT
INTO ...

(this is using the PEAR MDB2 package)

So, log_statement= 'mod' won't log a "PREPARE ... AS INSERT", i guess.

b

pgsql-general by date:

Previous
From: Bob Pawley
Date:
Subject: Query
Next
From: Martijn van Oosterhout
Date:
Subject: Re: UTF-8