Re: [HACKERS] Deadlock with pg_dump? - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [HACKERS] Deadlock with pg_dump?
Date
Msg-id 200703022020.l22KKRQ00125@momjian.us
Whole thread Raw
In response to Re: [HACKERS] Deadlock with pg_dump?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Deadlock with pg_dump?
List pgsql-patches
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Are people going to be happy that log_statement and
> > log_min_duration_statement output the statement twice?
>
> If those are the only cases you're worried about, a far simpler solution
> is to clear debug_query_string before instead of after emitting those
> log messages.

I am concerned about setting debug_query_string to NULL, calling
ereport(), and then resetting it might cause problems because of cases
where ereport might want to access debug_query_string for other uses,
for cases where ereport doesn't return to the reset code (but I assume
that is handled), and for cases like pgmonitor that would stop a
backend, read debug_query_string, and disconnect.

I can create a global variable to control this, but the new elog level
seemed cleaner.

--
  Bruce Momjian  <bruce@momjian.us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Final version of IDENTITY/GENERATED patch
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Deadlock with pg_dump?