Log_statement behaviour a little misleading? - Mailing list pgsql-general

From Mark Kirkwood
Subject Log_statement behaviour a little misleading?
Date
Msg-id 40063977.7020106@paradise.net.nz
Whole thread Raw
Responses Re: Log_statement behaviour a little misleading?
List pgsql-general
This caught me today :

I switched on "log_statement=true" whilst examining a possible foreign
key concurrency problem. I noticed that the generated foreign key check

"SELECT 1 FROM ONLY ... WHERE id = ...FOR UPDATE..."

on the parent table seemed to be only appearing every now and again.
This caused some scratching of the head :-)

Finally light dawned (ok - after reading ri_triggers.c and querying
pg_locks) - that the backend saves the execution plan for the generated
statement, so it is only planned once...and I guess log_statement is
triggered in the plan stage somewhere...

So setting "log_statement=true" does all *statements* - but not all
*executions* of each statement. Is this the intention?

(BTW - I am using 7.4.1)


best wishes

Mark


pgsql-general by date:

Previous
From: "LitelWang"
Date:
Subject: Re: about postgres odbc on wondows
Next
From: Mike Nolan
Date:
Subject: Re: Schemas not created on restore