missing pg_clog files after pg_upgrade

Started by Christian J. Dietrichalmost 14 years ago2 messagesgeneral
Jump to latest
#1Christian J. Dietrich
dietrich@internet-sicherheit.de

Hey all,

I have a problem which I speculate to be due to the pg_upgrade bug [1]http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix:

ERROR: could not access status of transaction 13636
DETAIL: could not open file "pg_clog/0000": No such file or directory

The pg_clog directory contains files with names in the range from 004A
to 0105. 004A dates January 2012, 0105 is as of today. my version of
postgresql is 9.1.3-1PGDG.rhel6.x86_64 running on CentOS 6.2.
We pg_upgraded from 8.4.2 to 9.0.2 (Feb 2011) and then to 9.1.1 (Oct
2011). Unfortunately, I do not have backups of the pg_clog before
upgrading to 9.1. I immediately stopped the database when encountering
these errors above.

To me (naive) it looks like the pg_clog file names "wrapped around" and
now start to re-use from 0000 on (which does not exist). Is there any
chance I can fix this (and avoid data loss)? I did not apply the VACUUM
FREEZE fix suggested in [1]http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix because I could not restore missing pg_clog
files. What can I do?

Thanks in advance,
Chris

[1]: http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix

--
Christian J. Dietrich
Institute for Internet Security - if(is)
Westfaelische Hochschule University of Applied Sciences
https://www.internet-sicherheit.de

#2Bruce Momjian
bruce@momjian.us
In reply to: Christian J. Dietrich (#1)
Re: missing pg_clog files after pg_upgrade

On Wed, May 16, 2012 at 01:27:18PM +0200, Christian J. Dietrich wrote:

Hey all,

I have a problem which I speculate to be due to the pg_upgrade bug [1]:

ERROR: could not access status of transaction 13636
DETAIL: could not open file "pg_clog/0000": No such file or directory

The pg_clog directory contains files with names in the range from 004A
to 0105. 004A dates January 2012, 0105 is as of today. my version of
postgresql is 9.1.3-1PGDG.rhel6.x86_64 running on CentOS 6.2.
We pg_upgraded from 8.4.2 to 9.0.2 (Feb 2011) and then to 9.1.1 (Oct
2011). Unfortunately, I do not have backups of the pg_clog before
upgrading to 9.1. I immediately stopped the database when encountering
these errors above.

To me (naive) it looks like the pg_clog file names "wrapped around" and
now start to re-use from 0000 on (which does not exist). Is there any
chance I can fix this (and avoid data loss)? I did not apply the VACUUM
FREEZE fix suggested in [1] because I could not restore missing pg_clog
files. What can I do?

Thanks in advance,
Chris

[1]: http://wiki.postgresql.org/wiki/20110408pg_upgrade_fix

Sorry, I don't know of any solution to this except perhaps creating
all-committed clog files to match the missing file.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +