Re: Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout
Date: 2008-04-16 18:09:42
Message-ID: 20080416110942.3710dc7b@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Wed, 16 Apr 2008 21:04:17 +0300
Heikki Linnakangas <heikki(at)enterprisedb(dot)com> wrote:

> To quote Tom:
> > I think we need to be careful to distinguish three situations:
> >
> > * statement_timeout during pg_dump
> > * statement_timeout during pg_restore
> > * statement_timeout during psql reading a pg_dump script file
>
> This patch addresses the third situation, but leaves open the 1st and
> the 2nd. IMO, we should set statement_timeout = 0 in them as well,
> unless someone comes up with plausible use case for using a non-zero
> statement_timeout.

My patch addresses all three, unless I am misunderstanding your
meaning. The patch does the following:

After connection with pg_dump it executes set statement_timeout = 0;
This fixed the pg_dump timeout issue.

It also writes set statement_timeout = 0 into the archive file, which
fixed pg_restore and psql.

>
> Ps. If you want to save the committer a couple of minutes of valuable
> time, you can fix the indentation to use tabs instead of spaces, and
> remove the spurious whitespace change on the empty line.
>

I can do that. Thanks for the feedback.

Joshua D. Drake

--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-04-16 18:10:30 Re: How to submit a patch
Previous Message Heikki Linnakangas 2008-04-16 18:04:17 Re: Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2008-04-16 18:20:17 Re: Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout
Previous Message Heikki Linnakangas 2008-04-16 18:04:17 Re: Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout