Recreating archive_status

Lists: pgsql-hackers
From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Recreating archive_status
Date: 2007-12-12 22:28:58
Message-ID: 1197498538.4255.1652.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

During recovery procedures, there is a step that says

"If you didn't archive pg_xlog/ at all, then recreate it, and be sure to
recreate the subdirectory pg_xlog/archive_status/ as well."

If you forget to do this, you may not realise until the recovering
server comes up and tries writing to the directory. The message that is
spat out when this happens is

LOG: could not create archive status file
"pg_xlog/archive_status/00000001000003CE0000009E.ready": No such file or
directory

We could check this just as the server comes up and then re-create it if
necessary. So we have one less step in the process to remember. Existing
scripts which perform this automatically will not need changing.

We can keep the message in case something removes the directory later.

Views?

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


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recreating archive_status
Date: 2007-12-12 22:34:27
Message-ID: 20071212143427.7410c4b7@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 12 Dec 2007 22:28:58 +0000
Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:

> We could check this just as the server comes up and then re-create it
> if necessary. So we have one less step in the process to remember.
> Existing scripts which perform this automatically will not need
> changing.
>
> We can keep the message in case something removes the directory later.
>
> Views?

+1

Sincerely,

Joshua D. Drake

- --
The PostgreSQL Company: Since 1997, http://www.commandprompt.com/
Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
SELECT 'Training', 'Consulting' FROM vendor WHERE name = 'CMD'

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHYGH0ATb/zqfZUUQRAlwiAJ4/GtkdBhtwFqOv71V8QIkJTg+WwgCglDip
3zLszrv1bmqEsDPRtuj1w04=
=bFdr
-----END PGP SIGNATURE-----


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Recreating archive_status
Date: 2007-12-12 23:36:00
Message-ID: 200712130036.00604.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Simon Riggs wrote:
> We could check this just as the server comes up and then re-create it if
> necessary. So we have one less step in the process to remember. Existing
> scripts which perform this automatically will not need changing.

Oh please yes

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Recreating archive_status
Date: 2008-03-18 02:37:18
Message-ID: 200803180237.m2I2bIq23600@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Added to TODO:

o Recreate pg_xlog/archive_status/ if it doesn't exist after
restoring from a PITR backup

http://archives.postgresql.org/pgsql-hackers/2007-12/msg00487.php

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

Simon Riggs wrote:
> During recovery procedures, there is a step that says
>
> "If you didn't archive pg_xlog/ at all, then recreate it, and be sure to
> recreate the subdirectory pg_xlog/archive_status/ as well."
>
> If you forget to do this, you may not realise until the recovering
> server comes up and tries writing to the directory. The message that is
> spat out when this happens is
>
> LOG: could not create archive status file
> "pg_xlog/archive_status/00000001000003CE0000009E.ready": No such file or
> directory
>
> We could check this just as the server comes up and then re-create it if
> necessary. So we have one less step in the process to remember. Existing
> scripts which perform this automatically will not need changing.
>
> We can keep the message in case something removes the directory later.
>
> Views?
>
> --
> Simon Riggs
> 2ndQuadrant http://www.2ndQuadrant.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

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

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