Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLCNF-0002yi-MY for pgsql-general@arkaria.postgresql.org; Tue, 22 May 2018 18:51:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fLCNE-0008QO-Hr for pgsql-general@arkaria.postgresql.org; Tue, 22 May 2018 18:51:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLCJU-0002cD-If for pgsql-general@lists.postgresql.org; Tue, 22 May 2018 18:47:14 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLCJO-00073C-TH for pgsql-general@postgresql.org; Tue, 22 May 2018 18:47:11 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0509C21B6B; Tue, 22 May 2018 14:47:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 22 May 2018 14:47:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=E3er24CfvXAs45Qxq3erTMSoYfxW1 +E9tIG1XUwxmuY=; b=YUx6bYuFqhQAWY7YHQCkLV2gLUg8idYqJM1sLu2PNQuPJ YZO/RBnyJwFNy7isdY2GDgV4NOl1ozQPF4aeNIs7/QxeuxpzJU1oQ9K1SFkuofQZ uVy1jTfseELkn2W+dl6cmYbi5G5vwck926HWCxKsNce7I6Rpl0Q3lKPwO6kawULU CRtqogoujsm4+izOmWCyLZx22FYCPMZZXhKiEhVD//+OImSd8w6uZyf0VEaX5n0c ThmIB69hlsOoPpF8tQdPwFWnBTw3+drkXeONXLZ71JXKfPA8zdshG0uPEYY0NqOq dZEYAhhTpZbUxv9UIiS0PgHaEkh0sw5V5yggiF5gA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=E3er24 CfvXAs45Qxq3erTMSoYfxW1+E9tIG1XUwxmuY=; b=OWbryawhtnNOUMECFObYjU FNeANzbgms/kRAua1L6PqzL9ZjHGqTCtOTQW3rWpY6DEptnVqmRm2/Em5kxbMuAK rVV/PAVwIWorfNaEtE48bTOkPZA/cz5POYXqnQ5+yqCx8tBqQvWthYkSGK2GSi6L LSioBeNX+qVA0K/2TqRtx1qDjK+dkjRgGTkdyIdKPhPpTTJQmcMJWk2fKnw5810G ZRiLHVe1svfYIUzthDNbIgLD335lKMLYTr9UxsolB6FkzATCRH3iJSWPEULFLgdR ajiyEJ4wyPmS5kyiyLclb6y4myz2xD+57OsLuVP90mRrwLlgDKo1sOliSxsBGzPw == X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Proxy: X-ME-Sender: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 7DA1D1025E; Tue, 22 May 2018 14:47:02 -0400 (EDT) Date: Tue, 22 May 2018 11:47:01 -0700 From: Andres Freund To: Maxim Boguk Cc: Peter Geoghegan , Jeremy Finzel , Alvaro Herrera , Postgres General Subject: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid Message-ID: <20180522184701.wg2calyg65mshy5f@alap3.anarazel.de> References: <20180522165715.oxwn4wyhv7f56asv@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2018-05-22 21:30:43 +0300, Maxim Boguk wrote: > ​For sample: > > postgres=# vacuum pg_catalog.pg_authid; > ERROR: found xmin 2894889518 from before relfrozenxid 248712603 > > select ctid, xmin, xmax, cmin, cmax from pg_catalog.pg_authid where > xmin::text::bigint=2894889518; > ctid | xmin | xmax | cmin | cmax > --------+------------+------+------+------ > (1,26) | 2894889518 | 0 | 0 | 0 > > > postgres=# SELECT * FROM heap_page_items(get_raw_page('pg_authid', 1)) > where t_ctid::text='(1,26)'; > -[ RECORD 1 > ]----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > lp | 26 > lp_off | 4656 > lp_flags | 1 > lp_len | 144 > t_xmin | 2894889518 > t_xmax | 0 > t_field3 | 0 > t_ctid | (1,26) > t_infomask2 | 32779 > t_infomask | 10507 > t_hoff | 32 > t_bits | 1111111111000000 > t_oid | 189787727 > So this row has, if I didn't screw up decoding the following infomask bits set:: HEAP_HASNULL HEAP_HASVARWIDTH HEAP_HASOID HEAP_XMIN_COMMITTED HEAP_XMAX_INVALID HEAP_UPDATED So it's not been previously frozen, which I was wondering about. > Which indeed makes it > Any new role created in DB instantly affected by this issue. What's txid_current()? > > In the same time: > > select relfrozenxid from pg_class where relname='pg_authid'; > relfrozenxid > -------------- > 2863429136 > > So it's interesting where value of " from before relfrozenxid 248712603" > come from. Hm. That's indeed odd. Could you get a backtrace of the error with "bt full" of the error? Greetings, Andres Freund