Prev: [HACKERS] pg_stop_backup does not complete
Next: [PATCH] backend: compare word-at-a-time in bcTruelen
From: Josh Berkus on 24 Feb 2010 15:32 > pg_stop_backup() doesn't complete until all the WAL segments needed to > restore from the backup are archived. If archive_command is failing, > that never happens. OK, so we need a way out of that cycle if the user is issuing pg_stop_backup because they *already know* that archive_command is failing. Right now, there's no way out other than a fast shutdown, which is a bit user-hostile. --Josh Berkus -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: "Joshua D. Drake" on 24 Feb 2010 15:37 On Wed, 2010-02-24 at 12:32 -0800, Josh Berkus wrote: > > pg_stop_backup() doesn't complete until all the WAL segments needed to > > restore from the backup are archived. If archive_command is failing, > > that never happens. > > OK, so we need a way out of that cycle if the user is issuing > pg_stop_backup because they *already know* that archive_command is > failing. Right now, there's no way out other than a fast shutdown, > which is a bit user-hostile. Hmmm well... changing the archive_command to /bin/true and issuing a HUP would cause the command to succeed, but I still think that is over the top. I prefer Kevin's solution or some variant thereof: http://archives.postgresql.org/pgsql-hackers/2010-02/msg01853.php http://archives.postgresql.org/pgsql-hackers/2010-02/msg01907.php Sincerely, Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564 Consulting, Training, Support, Custom Development, Engineering Respect is earned, not gained through arbitrary and repetitive use or Mr. or Sir. -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Heikki Linnakangas on 24 Feb 2010 15:39 Josh Berkus wrote: >> pg_stop_backup() doesn't complete until all the WAL segments needed to >> restore from the backup are archived. If archive_command is failing, >> that never happens. > > OK, so we need a way out of that cycle if the user is issuing > pg_stop_backup because they *already know* that archive_command is > failing. Right now, there's no way out other than a fast shutdown, Sure there is. Just kill the session, Ctrl-c or similar. pg_stop_backup() isn't actually doing anything at that point anymore; it's just waiting for the files to be archived before returning. Or fix archive_command, and pg_reload_conf(). BTW, if you want a timeout for that, you can use statement_timeout. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: "Kevin Grittner" on 24 Feb 2010 15:40 Josh Berkus <josh(a)agliodbs.com> wrote: >> pg_stop_backup() doesn't complete until all the WAL segments >> needed to restore from the backup are archived. If >> archive_command is failing, that never happens. > > OK, so we need a way out of that cycle if the user is issuing > pg_stop_backup because they *already know* that archive_command is > failing. Right now, there's no way out other than a fast > shutdown, which is a bit user-hostile. So maybe pg_abort_backup() is needed for 9.0 after all? (1) You'd want to be able to run it either instead of pg_stop_backup or to interrupt a pending one. (2) You wouldn't want the .backup file to be written. (3) What about the equivalent WAL end-of-backup record? -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Simon Riggs on 24 Feb 2010 15:46
On Wed, 2010-02-24 at 11:55 -0800, Joshua D. Drake wrote: > On Wed, 2010-02-24 at 19:02 +0000, Simon Riggs wrote: > > On Wed, 2010-02-24 at 10:17 -0800, Joshua D. Drake wrote: > > > You make the mistake of assuming that someone that can develop has no > > solution experience. That is exactly how I fund further development, so > > you are off base by a long way. > > I never implied that. I implied that your perspective is currently > skewed. I stand by that implication. My perspective comes from knowing the code AND having production experience with PostgreSQL many times over. -- Simon Riggs www.2ndQuadrant.com -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers |