pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Chmielewski <mangoo@wpkg.org>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-admin@postgresql.org
Subject: Re: 'SGT DETAIL: Could not open file "pg_clog/05DC": No such file or directory' - what to do now?
Date: Sat, 07 May 2011 23:19:16 +0200
Message-ID: <4DC5B754.3040506@wpkg.org> (raw)
In-Reply-To: <4DC3B469.80004@wpkg.org>
References: <4DC0F063.70306@wpkg.org>
	<4DC15137020000250003D295@gw.wicourts.gov>
	<4DC19CD1.7070600@wpkg.org>
	<BANLkTikG3yN0xB_wTy1SVYOrA9E=FNBZLg@mail.gmail.com>
	<4DC1B378.6050105@wpkg.org>
	<4DC1B6C0.2000507@wpkg.org>
	<4DC3B469.80004@wpkg.org>

On 06.05.2011 10:42, Tomasz Chmielewski wrote:
> On 04.05.2011 22:27, Tomasz Chmielewski wrote:
>
>>>> Then another pg_clog file disappeared.
>>
>> OK, I have:
>>
>> bookstor=# SELECT * FROM core_wot_seq;
>> sequence_name | last_value | increment_by | max_value | min_value |
>> cache_value | log_cnt | is_cycled | is_called
>> ------------------+------------+--------------+---------------------+-----------+-------------+---------+-----------+-----------
>>
>> core_wot_seq | 2593 | 1 | 9223372036854775807 | 1 | 1 | 8 | f | t
>> (1 row)
>>
>> bookstor=# SELECT 1 FROM core_wot_seq;
>> ?column?
>> ----------
>> 1
>> (1 row)
>>
>> bookstor=# SELECT 1 FROM core_wot_seq FOR UPDATE;
>> ERROR: could not access status of transaction 1573786613
>> DETAIL: Could not open file "pg_clog/05DC": No such file or directory.
>>
>> How do I best recover from this? Stop postgres, create an empty, 256k
>> pg_clog/05DC file, start postgres?
>>
>> Export table, drop table, import table? Anything else?
>
> Nobody has a clue? :|

Just as a follow up, it turned out several sequences, and only sequences 
were affected this way.

I used pg_dump to export these sequences, dropped the sequences, and 
imported them again.

As there were some tables which depended on these sequences, I had to 
use ALTER TABLE as well several times - grepping for the affected 
sequence in the whole database dump gave me hints on what I had to do.


-- 
Tomasz Chmielewski
http://wpkg.org



view thread (12+ messages)  latest in thread

Message-ID: <4DC5B754.3040506@wpkg.org>
Permalink:  ../4DC5B754.3040506@wpkg.org/
Also on:    postgresql.org/message-id/4DC5B754.3040506@wpkg.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: mangoo@wpkg.org, scott.marlowe@gmail.com, Kevin.Grittner@wicourts.gov
  Subject: Re: 'SGT DETAIL: Could not open file "pg_clog/05DC": No such file or directory' - what to do now?
  In-Reply-To: <4DC5B754.3040506@wpkg.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox