Skip site navigation (1) Skip section navigation (2)

Re: 'SGT DETAIL: Could not open file "pg_clog/05DC": No such file or directory' - what to do now?

From: Tomasz Chmielewski <mangoo(at)wpkg(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-admin(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: 'SGT DETAIL: Could not open file "pg_clog/05DC": No such file or directory' - what to do now?
Date: 2011-05-31 08:26:58
Message-ID: 4DE4A652.2040301@wpkg.org (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-hackers
On 31.05.2011 05:16, Tom Lane wrote:
> Tomasz Chmielewski<mangoo(at)wpkg(dot)org>  writes:
>> bookstor=# SELECT 1 FROM core_wot_seq FOR UPDATE;
> 
> Um ... why are you doing that on a sequence?
> 
>> ERROR: could not access status of transaction 1573786613
>> DETAIL: Could not open file "pg_clog/05DC": No such file or directory.
> 
> This doesn't surprise me too much, because sequences are not expected
> to contain any live XIDs, so the XID freezing mechanism ignores them.
> So if you did that in the past, this would eventually happen.
> 
> I think the most appropriate solution may be to disallow SELECT FOR
> UPDATE/SHARE on sequences ... so if you have a good reason why we
> shouldn't do so, please explain it.

That's a good question.

I grepped the sources of the application using postgres, and it certainly doesn't do it.


We use pgpool though, and I see:

pool_process_query.c:		snprintf(qbuf, sizeof(qbuf), "SELECT 1 FROM %s FOR UPDATE", seq_rel_name);


So it looks to be coming from pgpool 3.x (it didn't do it in 2.x version).

This is a message explaining why it was introduced to pgpool:

http://comments.gmane.org/gmane.comp.db.postgresql.pgpool.devel/348


This brings two questions:

1) whatever command I send to postgres, should I expect "Could not open file "pg_clog/05DC": No such file or directory"?
If so, it should be documented, and a way to recover from such a situation should be explained.

2) is pgpool behaviour correct?


-- 
Tomasz Chmielewski
http://wpkg.org


In response to

Responses

pgsql-hackers by date

Next:From: Magnus HaganderDate: 2011-05-31 08:31:10
Subject: Re: Getting a bug tracker for the Postgres project
Previous:From: Peter EisentrautDate: 2011-05-31 08:12:43
Subject: Re: Getting a bug tracker for the Postgres project

pgsql-admin by date

Next:From: Simon RiggsDate: 2011-05-31 09:05:24
Subject: Re: Insert statement deletes older table records
Previous:From: Tom LaneDate: 2011-05-31 03:16:53
Subject: Re: 'SGT DETAIL: Could not open file "pg_clog/05DC": No such file or directory' - what to do now?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group