Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 63FF513CCE61 for ; Thu, 2 Feb 2012 05:48:00 -0400 (AST) Received: from exprod7og113.obsmtp.com ([64.18.2.179]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RstGq-0007CC-Ih for pgsql-hackers@postgresql.org; Thu, 02 Feb 2012 09:48:01 +0000 Received: from mail-lpp01m010-f48.google.com ([209.85.215.48]) (using TLSv1) by exprod7ob113.postini.com ([64.18.6.12]) with SMTP ID DSNKTypbw1eWBPyr/M47A8RBSH8sxavgZ86z@postini.com; Thu, 02 Feb 2012 01:48:00 PST Received: by lagw12 with SMTP id w12so767183lag.7 for ; Thu, 02 Feb 2012 01:47:45 -0800 (PST) Received: by 10.152.114.74 with SMTP id je10mr1052599lab.40.1328176065448; Thu, 02 Feb 2012 01:47:45 -0800 (PST) Received: from [192.168.1.102] (dsl-hkibrasgw2-ff6cc300-200.dhcp.inet.fi. [88.195.108.200]) by mx.google.com with ESMTPS id jh4sm1567584lab.17.2012.02.02.01.47.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Feb 2012 01:47:44 -0800 (PST) Message-ID: <4F2A5BBF.7020900@enterprisedb.com> Date: Thu, 02 Feb 2012 11:47:43 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120104 Icedove/8.0 MIME-Version: 1.0 To: Simon Riggs CC: Jim Nasby , PostgreSQL-development Subject: Re: Refactoring log_newpage References: <4FF85E04-6418-4A84-8541-9A868ABA8D75@nasby.net> <4F2A3A91.4070001@enterprisedb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201202/70 X-Sequence-Number: 202435 On 02.02.2012 11:35, Simon Riggs wrote: > On Thu, Feb 2, 2012 at 7:26 AM, Heikki Linnakangas > wrote: > >> Well, you can obviously check the catalogs for that, but you must be >> assuming that you don't have access to the catalogs or this would be a >> non-issue. >> >> You can also identify the kind of page by looking at the special area of the >> stored page. See: >> http://archives.postgresql.org/pgsql-hackers/2007-04/msg00392.php > > How does that work with different forks? You have the fork number explicitly in the newpage record already. > I think its very ugly to mark all sorts of different pages as if they > were heap pages when they clearly aren't. I don't recall anything so > ugly being allowed anywhere else in the system. Why is it *needed* > here? It's not needed. Beauty is in the eye of the beholder, but I don't find it all that ugly, and the comment in log_newpage explains it well. I don't see much value in adding a new field to the record. Any tools that read the WAL format will need to be taught about that change. Not a huge issue, but I also don't see much gain. On the whole I'd be inclined to just leave it all alone, but whatever. I don't think it's a good idea to rename XLOG_HEAP_NEWPAGE to XLOG_NEWPAGE. The WAL record is still part of the heapam rmgr, even if it's used by other access methods, too. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com