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

2008-06-24 Thread daveg
On Tue, Jun 24, 2008 at 10:41:07PM -0400, Tom Lane wrote: > daveg <[EMAIL PROTECTED]> writes: > > Are we talking about the same patch? > > Maybe not --- I thought you were talking about a backend-side behavioral > change. > > > Because I don't know what you are > > refering to with "timer managem

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

2008-06-24 Thread Tom Lane
daveg <[EMAIL PROTECTED]> writes: > Are we talking about the same patch? Maybe not --- I thought you were talking about a backend-side behavioral change. > Because I don't know what you are > refering to with "timer management code" and "scheduling the interrupt" in > the context of pg_dump. I'm

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

2008-06-24 Thread daveg
On Tue, Jun 24, 2008 at 05:34:50PM -0400, Tom Lane wrote: > daveg <[EMAIL PROTECTED]> writes: > > 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. > > "rese

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

2008-06-24 Thread Tom Lane
daveg <[EMAIL PROTECTED]> writes: > 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. "reset to default" is *surely* not the right behavior; resetting to the set

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

2008-06-24 Thread daveg
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 > > > > <[EMAIL PROTECTED]> wrote: > > > > > Joshua D. Drake escribi?:

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

2008-06-24 Thread Bruce Momjian
Joshua D. Drake wrote: > Alex Hunsaker wrote: > > On Mon, Jun 23, 2008 at 4:51 PM, Bruce Momjian <[EMAIL PROTECTED]> wrote: > >> 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

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

2008-06-24 Thread Joshua D. Drake
Alex Hunsaker wrote: On Mon, Jun 23, 2008 at 4:51 PM, Bruce Momjian <[EMAIL PROTECTED]> wrote: 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

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

2008-06-24 Thread Bruce Momjian
Alex Hunsaker wrote: > On Mon, Jun 23, 2008 at 4:51 PM, Bruce Momjian <[EMAIL PROTECTED]> wrote: > > 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

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

2008-06-23 Thread Alex Hunsaker
On Mon, Jun 23, 2008 at 4:51 PM, Bruce Momjian <[EMAIL PROTECTED]> wrote: > 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 believe so.

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

2008-06-23 Thread Bruce Momjian
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 > > > <[EMAIL PROTECTED]> wrote: > > > > Joshua D. Drake escribi?: > > > > > > > > > That is an interesting idea. Something like: > > > > > >

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

2008-06-23 Thread daveg
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 > > <[EMAIL PROTECTED]> wrote: > > > Joshua D. Drake escribi?: > > > > > > > That is an interesting idea. Something like: > > > > > > > > pg_restore -E "SET ST

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

2008-06-23 Thread Bruce Momjian
Alex Hunsaker wrote: > On Wed, Apr 16, 2008 at 4:54 PM, Alvaro Herrera > <[EMAIL PROTECTED]> 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 -

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

2008-05-04 Thread Andrew Dunstan
Euler Taveira de Oliveira wrote: Andrew Dunstan wrote: Committed with slight editorializing. Statement timeout was only introduced in 7.3, whereas pg_dump can dump from much older versions of Postgres. You forget a ; in this committ [1]. [1] http://archives.postgresql.org/pgsql-committer

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

2008-05-03 Thread Euler Taveira de Oliveira
Andrew Dunstan wrote: Committed with slight editorializing. Statement timeout was only introduced in 7.3, whereas pg_dump can dump from much older versions of Postgres. You forget a ; in this committ [1]. [1] http://archives.postgresql.org/pgsql-committers/2008-05/msg00028.php -- Euler

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

2008-05-03 Thread Andrew Dunstan
Joshua D. Drake wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 11 Mar 2008 10:46:23 -0700 "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: And the -c version :) (thanks bruce) Committed with slight editorializing. Statement timeout was only introduced in 7.3, whereas pg_du

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

2008-04-17 Thread Martijn van Oosterhout
On Thu, Apr 17, 2008 at 03:18:54PM +0200, Peter Eisentraut wrote: > I think the bottom line is just that having statement_timeout a global > setting > is stupid for a variety of reasons (dump, restore, vacuum, locks, incidental > delays) that we should discourage it (or prevent it, as proposed e

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

2008-04-17 Thread Heikki Linnakangas
Greg Sabino Mullane wrote: A use case would be dumping a large table and wanting to load it into the database, but wanting to stop the job if it is still running an hour from now, when a maintenance window is scheduled to start. statement_timeout is pretty useless for that purpose, because it l

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

2008-04-17 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > Sorry if I missed it in the original thread, but what is the > use case you have in mind? A use case would be dumping a large table and wanting to load it into the database, but wanting to stop the job if it is still running an hour from now,

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

2008-04-17 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Heikki Linnakangas wrote: >> Sorry if I missed it in the original thread, but what is the use case >> you have in mind? > I think the bottom line is just that having statement_timeout a global > setting > is stupid for a variety of reasons (dump, re

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

2008-04-17 Thread Peter Eisentraut
Heikki Linnakangas wrote: > Sorry if I missed it in the original thread, but what is the use case > you have in mind? I think the bottom line is just that having statement_timeout a global setting is stupid for a variety of reasons (dump, restore, vacuum, locks, incidental delays) that we should

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

2008-04-16 Thread Heikki Linnakangas
Greg Sabino Mullane wrote: I agree that we should do that, but the thread on -hackers ("Autovacuum vs statement_timeout") wasn't totally conclusive. Greg Sabine Mullane and Peter Eisentraut argued that we shouldn't, but neither provided a plausible use case where a statement_timeout on restoring

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

2008-04-16 Thread Alex Hunsaker
On Wed, Apr 16, 2008 at 4:54 PM, Alvaro Herrera <[EMAIL PROTECTED]> 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 n

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

2008-04-16 Thread Alvaro Herrera
Joshua D. Drake escribió: > On Wed, 16 Apr 2008 18:50:28 -0400 > Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > Actually, it's probably more important to be selectable at restore > > time than at dump time, so if you're doing just one ... I think the patch posted by Joshua at the start of this thr

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

2008-04-16 Thread Joshua D. Drake
On Wed, 16 Apr 2008 18:50:28 -0400 Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > > Alex Hunsaker wrote: > > > > > > Sorry if i missed the obvious reason not to do this... but if its a > > command line option the user can choose. Why not something like > > this (i did it for pg_dump only...) > >

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

2008-04-16 Thread Andrew Dunstan
Alex Hunsaker wrote: Sorry if i missed the obvious reason not to do this... but if its a command line option the user can choose. Why not something like this (i did it for pg_dump only...) Actually, it's probably more important to be selectable at restore time than at dump time, so if

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

2008-04-16 Thread Alex Hunsaker
On Wed, Apr 16, 2008 at 4:32 PM, Joshua D. Drake <[EMAIL PROTECTED]> wrote: > On Wed, 16 Apr 2008 15:22:31 -0700 > > "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > > > > On Wed, 16 Apr 2008 22:17:30 - > > "Greg Sabino Mullane" <[EMAIL PROTECTED]> wrote: > > > > > I don't think it's fair to s

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

2008-04-16 Thread Joshua D. Drake
On Wed, 16 Apr 2008 15:22:31 -0700 "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > On Wed, 16 Apr 2008 22:17:30 - > "Greg Sabino Mullane" <[EMAIL PROTECTED]> wrote: > > > I don't think it's fair to simply discard the use cases provided as > > "implausible" and demand one more to your liking.

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

2008-04-16 Thread Joshua D. Drake
On Wed, 16 Apr 2008 22:17:30 - "Greg Sabino Mullane" <[EMAIL PROTECTED]> wrote: > I don't think it's fair to simply discard the use cases provided as > "implausible" and demand one more to your liking. I strongly dislike > having a giant dump file written that has non-vital configuration > va

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

2008-04-16 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > I agree that we should do that, but the thread on -hackers ("Autovacuum > vs statement_timeout") wasn't totally conclusive. Greg Sabine Mullane > and Peter Eisentraut argued that we shouldn't, but neither provided a > plausible use case where

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

2008-04-16 Thread Joshua D. Drake
On Wed, 16 Apr 2008 21:20:17 +0300 Heikki Linnakangas <[EMAIL PROTECTED]> wrote: > > 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 t

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

2008-04-16 Thread Heikki Linnakangas
Joshua D. Drake wrote: On Wed, 16 Apr 2008 21:04:17 +0300 Heikki Linnakangas <[EMAIL PROTECTED]> 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

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

2008-04-16 Thread Joshua D. Drake
On Wed, 16 Apr 2008 21:04:17 +0300 Heikki Linnakangas <[EMAIL PROTECTED]> 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

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

2008-04-16 Thread Heikki Linnakangas
Joshua D. Drake wrote: What is the feedback on this patch? Is there anything I need to do to get it into the next commit fest? Yes, go add it to the wiki page ;-): http://wiki.postgresql.org/wiki/CommitFest:May I agree that we should do that, but the thread on -hackers ("Autovacuum vs stateme

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

2008-04-16 Thread Joshua D. Drake
On Wed, 16 Apr 2008 13:36:50 -0400 Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Joshua D. Drake wrote: > > > What is the feedback on this patch? Is there anything I need to do > > to get it into the next commit fest? > > Please add it to the commitfest wiki page. > > http://wiki.postgresql.org/w

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

2008-04-16 Thread Alvaro Herrera
Joshua D. Drake wrote: > What is the feedback on this patch? Is there anything I need to do to > get it into the next commit fest? Please add it to the commitfest wiki page. http://wiki.postgresql.org/wiki/CommitFest:May -- Alvaro Herrerahttp://www.CommandPrompt

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

2008-04-16 Thread Joshua D. Drake
On Tue, 11 Mar 2008 11:07:27 -0700 "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Tue, 11 Mar 2008 10:46:23 -0700 > "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: > > And the -c version :) (thanks bruce) > > Joshua D. Drake > What is the fe

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

2008-03-11 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 11 Mar 2008 10:46:23 -0700 "Joshua D. Drake" <[EMAIL PROTECTED]> wrote: And the -c version :) (thanks bruce) Joshua D. Drake - -- The PostgreSQL Company since 1997: http://www.commandprompt.com/ PostgreSQL Community Conference: http://www.

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

2008-03-11 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, O.k. this appeared easy enough for even me to do it. So I did. It seems to work but I wasn't 100% positive on "where" I put the code changes. Please take a look. Sincerely, Joshua D. Drake - -- The PostgreSQL Company since 1997: http://www.