Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 09160B6074B for ; Tue, 31 May 2011 05:27:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 93402-05; Tue, 31 May 2011 08:27:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.virtall.com (mail.virtall.com [178.63.195.102]) by mail.postgresql.org (Postfix) with ESMTP id 88ADDB5DC3A; Tue, 31 May 2011 05:27:01 -0300 (ADT) Received: from mail.virtall.com (localhost [127.0.0.1]) by mail.virtall.com (Postfix) with ESMTP id 1E386363C69; Tue, 31 May 2011 10:27:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=wpkg.org; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=default; bh=b7M7i5DrU mJOeX33KUxsYrsLFps=; b=jh/bkNPimmOSy6Ac9hcsV/jfmT09W+F3pUPD0NiTs R2GQFGJtB4k6SQHOPR5MHfCN4TF0faWMgVQSOuBlYr9BxBX8L/W/d4Ndblc5o9Nt 0SvFtxnIBOp4pJyGayII3jf7183aEIEAi0tXnptJw+TgV9j1w9LtTepKXBUDPsog Pc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=wpkg.org; h=message-id:date :from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=default; b=Rh9 5tkuCKqVQM8Cam/8ApViW6fInKUGJTz06ujvKmNc4S3qwQGcbQSpDnBkvQe+ZMCr Uiks2a5I7o+7mX+YNhG0mEq/aT0ajt29au/njhEZuORHeKdZBYGdTZXaSAEMgGlh hJHfPLD/W2E6E9QBmkoF5kUKFSF3LbKjsfz0ANf4= Received: from [192.168.10.145] (e183095092.adsl.alicedsl.de [85.183.95.92]) by mail.virtall.com (Postfix) with ESMTPSA id 9784F363C68; Tue, 31 May 2011 10:26:59 +0200 (CEST) Message-ID: <4DE4A652.2040301@wpkg.org> Date: Tue, 31 May 2011 10:26:58 +0200 From: Tomasz Chmielewski User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Tom Lane CC: Scott Marlowe , Kevin Grittner , pgsql-admin@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: 'SGT DETAIL: Could not open file "pg_clog/05DC": No such file or directory' - what to do now? References: <4DC0F063.70306@wpkg.org> <4DC15137020000250003D295@gw.wicourts.gov> <4DC19CD1.7070600@wpkg.org> <4DC1B378.6050105@wpkg.org> <4DC1B6C0.2000507@wpkg.org> <4DC3B469.80004@wpkg.org> <4DC5B754.3040506@wpkg.org> <4DE360D9.5060300@wpkg.org> <16063.1306811813@sss.pgh.pa.us> In-Reply-To: <16063.1306811813@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201105/182 X-Sequence-Number: 37619 On 31.05.2011 05:16, Tom Lane wrote: > Tomasz Chmielewski 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