Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 7E6B71337990 for ; Sat, 7 May 2011 18:19:44 -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 21953-02 for ; Sat, 7 May 2011 21:19:26 +0000 (UTC) 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 25B62133655C for ; Sat, 7 May 2011 18:19:25 -0300 (ADT) Received: from mail.virtall.com (localhost [127.0.0.1]) by mail.virtall.com (Postfix) with ESMTP id BAC9836286C; Sat, 7 May 2011 23:19:22 +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=vRTaVyXgS mdMmUnckOU9viCEecM=; b=945hLIU1jYWU+BaoXbyPdSNmQi2Kuhn2ke8wC9NHR kyReWewC883du4ff0kiYOwv0B/F36iLoiD2RAjy/bPO4qMLnPyiuegpGIQHV3L+U VGZxPHbqvPYH8zwzu4qlW+DZ6rTy/fzYbXx4brD0lGawK/wVlV1Y76YYqybPym73 7c= 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=eEX dTssSkKax//WJ36KGrn8dQ0AjfcepXbQXLpiXeKuARz3LDLor474bSvd1+Hmrzpu 6xDaVeV55HDIR2zyWrGUTN/kEFUiDEPI5RhF4LtHGfTFPuG985q2bVZuMSyWQmx3 xp5+gucIkJVj4Bfy8kvwhWWQZzc8Br4TRmeguPSQ= Received: from [10.111.0.6] (sc.virtall.com [178.63.195.125]) by mail.virtall.com (Postfix) with ESMTPSA id 4EC0636286A; Sat, 7 May 2011 23:19:22 +0200 (CEST) Message-ID: <4DC5B754.3040506@wpkg.org> Date: Sat, 07 May 2011 23:19:16 +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: Scott Marlowe CC: Kevin Grittner , pgsql-admin@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> In-Reply-To: <4DC3B469.80004@wpkg.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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/69 X-Sequence-Number: 37506 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