From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Jim Nasby <jim@nasby.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Refactoring log_newpage
Date: Thu, 02 Feb 2012 11:47:43 +0200
Message-ID: <4F2A5BBF.7020900@enterprisedb.com> (raw)
In-Reply-To: <CA+U5nMJXw_iTubW=LQyS6roQOUmhVvv2B6zDGVWZsXDnHKNkfA@mail.gmail.com>
References: <CA+U5nM+zRO2WAMq_gLbhGompMJNs-p5bJrJh8LgaMD-VDv2Utg@mail.gmail.com>
<4FF85E04-6418-4A84-8541-9A868ABA8D75@nasby.net>
<CA+U5nM+k+i40zny-nX5LfNGk-pJcmZv5QQF613A=PRTVqANGGw@mail.gmail.com>
<4F2A3A91.4070001@enterprisedb.com>
<CA+U5nMJXw_iTubW=LQyS6roQOUmhVvv2B6zDGVWZsXDnHKNkfA@mail.gmail.com>
On 02.02.2012 11:35, Simon Riggs wrote:
> On Thu, Feb 2, 2012 at 7:26 AM, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: heikki.linnakangas@enterprisedb.com, simon@2ndQuadrant.com, jim@nasby.net
Subject: Re: Refactoring log_newpage
In-Reply-To: <4F2A5BBF.7020900@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox