Skip site navigation (1) Skip section navigation (2)

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

From: daveg <daveg(at)sonic(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alex Hunsaker <badalex(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Patches <pgsql-patches(at)postgresql(dot)org>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout
Date: 2008-06-24 20:53:58
Message-ID: 20080624205358.GC12245@sonic.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Mon, Jun 23, 2008 at 07:30:53PM -0400, Bruce Momjian wrote:
> daveg wrote:
> > On Mon, Jun 23, 2008 at 06:51:28PM -0400, Bruce Momjian wrote:
> > > Alex Hunsaker wrote:
> > > > On Wed, Apr 16, 2008 at 4:54 PM, Alvaro Herrera
> > > > <alvherre(at)commandprompt(dot)com> wrote:
> > > > > Joshua D. Drake escribi?:
> > > > >
> > > > > > That is an interesting idea. Something like:
> > > > >  >
> > > > >  > pg_restore -E "SET STATEMENT_TIMEOUT=0; SET MAINTENANCE_WORK_MEM=1G" ?
> > > > >
> > > > >  We already have it -- it's called PGOPTIONS.
> > > > >
> > > > 
> > > > Ok but is not the purpose of the patch to turn off statement_timeout
> > > > by *default* in pg_restore/pg_dump?
> > > > 
> > > > Here is an updated patch for I posted above (with the command line
> > > > option --use-statement-timeout) for pg_dump and pg_restore.
> > > 
> > > I would like to get do this without adding a new --use-statement-timeout
> > > flag.  Is anyone going to want to honor statement_timeout during
> > > pg_dump/pg_restore?  I thought we were just going to disable it.
> > 
> > I have a patch in the queue to use set statement timeout while pg_dump is
> > taking locks to avoid pg_dump hanging for other long running transactions
> > that may have done ddl. Do I need to repost for discussion now?
> 
> I see it now, but I forgot how it would interact with this patch.  We
> would have to prevent --use-statement-timeout when lock timeout was
> being used, but my point is that I see no value in having
> --use-statement-timeout.

lock-timeout sets statement_timeout to a small value while locks are being
taken on all the tables. Then it resets it to default. So it could reset it
to whatever the new default is.

Do I need to adjust my patch or something?

-dg

-- 
David Gould       daveg(at)sonic(dot)net      510 536 1443    510 282 0869
If simplicity worked, the world would be overrun with insects.

In response to

Responses

pgsql-hackers by date

Next:From: Zoltan BoszormenyiDate: 2008-06-24 20:59:48
Subject: Re: proposal for smaller indexes on index-ordered tables
Previous:From: Jonah H. HarrisDate: 2008-06-24 20:50:14
Subject: Re: proposal for smaller indexes on index-ordered tables

pgsql-patches by date

Next:From: Tom LaneDate: 2008-06-24 21:34:50
Subject: Re: [HACKERS] Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout
Previous:From: Bruce MomjianDate: 2008-06-24 15:49:05
Subject: Re: [HACKERS] Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group