Minor recovery changes

Lists: pgsql-patches
From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: Minor recovery changes
Date: 2007-04-08 21:24:51
Message-ID: 1176067492.3623.699.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

As discussed on -hackers and -admin... a few minor changes, rolled into
a single patch.

- check we have an archiver to carry away WAL files at shutdown
(was part of task 1)

- archive_mode GUC, on which archive_command is dependent
closing loophole to avoid data loss with wal-avoiding commands
(was task 10)

- %r option in recovery.conf sends last restartpoint to recovery command
(was task 3)

- %r handled in pg_standby, updated README
(was task 4)

- code cleanup of pg_standby in various minor places

- doc on Warm Standby now includes pg_standby and %r

- log_restartpoints shows LOG message for at each restartpoint, rather
than DEBUG2 e.g.
LOG: recovery restart point at 0/42000020
(was task 5)

- end of recovery now displays last transaction end time, as requested
by Warren Little e.g.
LOG: last completed transaction was at log time 2007-04-08 18:07:11 BST
also shown at each restartpoint
(discussed on -admin, mar 30)

TODO (by me)

- docs need another thorough refresh to pick up minor mentions of
archive_command -> archive_mode

- work out how to keep archiver alive long enough to archive last WAL
file after a shutdown checkpoint... trickier than I imagined since it
overlaps need for fast exit when performing restart, per last edit of
the archiver code.

- agree whether to allow pg_stop_backup() to exit before file archived

Applies cleanly to CVS HEAD. Updated test files, all options tested.

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

Attachment Content-Type Size
test_warm_standby.tar.gz application/x-compressed-tar 6.1 KB
recovery_cleanup.v1.patch.gz application/x-gzip 10.6 KB

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Minor recovery changes
Date: 2007-04-09 03:02:59
Message-ID: 200704090302.l3932xI11083@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Simon, do you have email access while you are away for two weeks? Can
you answer questions via email?

---------------------------------------------------------------------------

Simon Riggs wrote:
> As discussed on -hackers and -admin... a few minor changes, rolled into
> a single patch.
>
> - check we have an archiver to carry away WAL files at shutdown
> (was part of task 1)
>
> - archive_mode GUC, on which archive_command is dependent
> closing loophole to avoid data loss with wal-avoiding commands
> (was task 10)
>
> - %r option in recovery.conf sends last restartpoint to recovery command
> (was task 3)
>
> - %r handled in pg_standby, updated README
> (was task 4)
>
> - code cleanup of pg_standby in various minor places
>
> - doc on Warm Standby now includes pg_standby and %r
>
> - log_restartpoints shows LOG message for at each restartpoint, rather
> than DEBUG2 e.g.
> LOG: recovery restart point at 0/42000020
> (was task 5)
>
> - end of recovery now displays last transaction end time, as requested
> by Warren Little e.g.
> LOG: last completed transaction was at log time 2007-04-08 18:07:11 BST
> also shown at each restartpoint
> (discussed on -admin, mar 30)
>
> TODO (by me)
>
> - docs need another thorough refresh to pick up minor mentions of
> archive_command -> archive_mode
>
> - work out how to keep archiver alive long enough to archive last WAL
> file after a shutdown checkpoint... trickier than I imagined since it
> overlaps need for fast exit when performing restart, per last edit of
> the archiver code.
>
> - agree whether to allow pg_stop_backup() to exit before file archived
>
> Applies cleanly to CVS HEAD. Updated test files, all options tested.
>
> --
> Simon Riggs
> EnterpriseDB http://www.enterprisedb.com
>

[ Attachment, skipping... ]

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

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


From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Minor recovery changes
Date: 2007-04-09 05:56:55
Message-ID: 1176098216.3623.712.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Sun, 2007-04-08 at 23:02 -0400, Bruce Momjian wrote:
> Simon, do you have email access while you are away for two weeks? Can
> you answer questions via email?

It's not a complete blackout, if I check through...

Irregular email 10-12 Apr
Now available 17 Apr half day
Email 19, 21 Apr eve

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Minor recovery changes
Date: 2007-04-09 13:37:06
Message-ID: 200704091337.l39Db6k18505@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Simon Riggs wrote:
> On Sun, 2007-04-08 at 23:02 -0400, Bruce Momjian wrote:
> > Simon, do you have email access while you are away for two weeks? Can
> > you answer questions via email?
>
> It's not a complete blackout, if I check through...
>
> Irregular email 10-12 Apr
> Now available 17 Apr half day

Ah, Now -> Not.

> Email 19, 21 Apr eve

I am confused. What about April 13-16? You are available during the
days you do not mention, I assume. Anyway, being able to check email
once a day and reply to a personal question to you is sufficient to
allow us to move the patches forward.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

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


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Minor recovery changes
Date: 2007-04-10 01:05:50
Message-ID: 200704100105.l3A15oa16213@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------

Simon Riggs wrote:
> As discussed on -hackers and -admin... a few minor changes, rolled into
> a single patch.
>
> - check we have an archiver to carry away WAL files at shutdown
> (was part of task 1)
>
> - archive_mode GUC, on which archive_command is dependent
> closing loophole to avoid data loss with wal-avoiding commands
> (was task 10)
>
> - %r option in recovery.conf sends last restartpoint to recovery command
> (was task 3)
>
> - %r handled in pg_standby, updated README
> (was task 4)
>
> - code cleanup of pg_standby in various minor places
>
> - doc on Warm Standby now includes pg_standby and %r
>
> - log_restartpoints shows LOG message for at each restartpoint, rather
> than DEBUG2 e.g.
> LOG: recovery restart point at 0/42000020
> (was task 5)
>
> - end of recovery now displays last transaction end time, as requested
> by Warren Little e.g.
> LOG: last completed transaction was at log time 2007-04-08 18:07:11 BST
> also shown at each restartpoint
> (discussed on -admin, mar 30)
>
> TODO (by me)
>
> - docs need another thorough refresh to pick up minor mentions of
> archive_command -> archive_mode
>
> - work out how to keep archiver alive long enough to archive last WAL
> file after a shutdown checkpoint... trickier than I imagined since it
> overlaps need for fast exit when performing restart, per last edit of
> the archiver code.
>
> - agree whether to allow pg_stop_backup() to exit before file archived
>
> Applies cleanly to CVS HEAD. Updated test files, all options tested.
>
> --
> Simon Riggs
> EnterpriseDB http://www.enterprisedb.com
>

[ Attachment, skipping... ]

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Minor recovery changes
Date: 2007-09-26 22:38:24
Message-ID: 11985.1190846304@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> As discussed on -hackers and -admin... a few minor changes, rolled into
> a single patch.

I've brought this up to speed with CVS HEAD and applied it.

I was not, however, sure what your intention was with the files in
test_warm_standby.tar.gz. That's not really intended to go into the
contrib module, is it?

regards, tom lane


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Minor recovery changes
Date: 2007-09-27 07:20:51
Message-ID: 1190877651.4194.10.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Wed, 2007-09-26 at 18:38 -0400, Tom Lane wrote:
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> > As discussed on -hackers and -admin... a few minor changes, rolled into
> > a single patch.
>
> I've brought this up to speed with CVS HEAD and applied it.

Many thanks.

> I was not, however, sure what your intention was with the files in
> test_warm_standby.tar.gz. That's not really intended to go into the
> contrib module, is it?

Not really, especially since its not a portable piece of code.

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com