Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YISfc-0004kC-D2 for pgsql-performance@arkaria.postgresql.org; Tue, 03 Feb 2015 01:52:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YISfb-00051y-OK for pgsql-performance@arkaria.postgresql.org; Tue, 03 Feb 2015 01:52:51 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YISfa-00051r-SF for pgsql-performance@postgresql.org; Tue, 03 Feb 2015 01:52:51 +0000 Received: from mail-bl2on0654.outbound.protection.outlook.com ([2a01:111:f400:fc09::654] helo=na01-bl2-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YISfX-0004P9-6F for pgsql-performance@postgresql.org; Tue, 03 Feb 2015 01:52:48 +0000 Received: from decina.local (24.55.12.91) by BY1PR11MB0342.namprd11.prod.outlook.com (25.160.206.155) with Microsoft SMTP Server (TLS) id 15.1.75.20; Tue, 3 Feb 2015 01:52:40 +0000 Message-ID: <54D029E0.7000800@BlueTreble.com> Date: Mon, 2 Feb 2015 19:52:32 -0600 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Slava Mudry , "pgsql-performance@postgresql.org" Subject: Re: why pg_class.relfrozenxid needs to be updated for frozen tables (where all rows have xmin=2)? References: <54CC2FBA.1040506@BlueTreble.com> <54D0260F.40508@BlueTreble.com> In-Reply-To: <54D0260F.40508@BlueTreble.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [24.55.12.91] X-ClientProxiedBy: DM2PR10CA0056.namprd10.prod.outlook.com (10.141.241.24) To BY1PR11MB0342.namprd11.prod.outlook.com (25.160.206.155) Authentication-Results: postgresql.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY1PR11MB0342; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BY1PR11MB0342; X-Forefront-PRVS: 0476D4AB88 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(51704005)(377454003)(24454002)(479174004)(76176999)(54356999)(92566002)(47776003)(50986999)(107886001)(33656002)(87266999)(42186005)(50466002)(86362001)(46102003)(66066001)(36756003)(2950100001)(80316001)(83506001)(122386002)(15975445007)(65816999)(62966003)(19580395003)(87976001)(93886004)(23676002)(77156002)(40100003)(85282002)(336755003)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR11MB0342; H:decina.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BY1PR11MB0342; X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2015 01:52:40.0953 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR11MB0342 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 2/2/15 7:36 PM, Jim Nasby wrote: >> >> Currently the fact that it needs to go back to old tables and FTS them >> every 2B transactions (or rely on autovacuum for this) and you can't do >> anything about it (like permanently freeze the tables) seems like a big >> scalability issue. Does it not? > > Unfortunately it's not terribly easy to fix this. The problem is if we > try to play games here, we must have a 100% reliable method for changing > relfrozenxid as soon as someone inserts a new tuple in the relation. It > might be possible to tie this into the visibility map, but no one has > looked at this yet. > > Perhaps you'd be willing to investigate this, or sponsor the work? Oh, there is another possibility that's been discussed: read-only tables. If we had the ability to mark a table read-only, then a VACUUM FREEZE on such a table would be able to set that table's relfrozenxid to FrozenTransactionId and prevent any further attempts at vacuuming. This might be easier than trying to do something automatic. -- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance