Re: Change in HEAP_NEWPAGE logging makes diagnosis harder

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change in HEAP_NEWPAGE logging makes diagnosis harder
Date: 2014-11-24 09:17:35
Message-ID: 5472F7AF.7040303@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/14/2014 10:17 AM, Heikki Linnakangas wrote:
> On 10/30/2014 04:12 PM, Andres Freund wrote:
>> Hi,
>>
>> I've just once more looked at the WAL stream ans was briefly confused
>> about all the XLOG_FPI records. Since 54685338e3
>> log_newpage/log_newpage_buffer and XLogSaveBufferForHint() use the same
>> WAL record. I personally find that a bad idea because they're used in
>> quite different situations.
>>
>> Can we use different IDs again?
>
> Yeah, we should do something about that. I'll fix that after the WAL
> format changes stuff.

Ok, I added a new XLOG_FPI_FOR_HINT record type for this. It's the same
as XLOG_FPI, but used in XLogSaveBufferForHint() so that the cases can
be distinguished.

Looking at the callers of log_newpage, many of them could easily be
replaced with rmgr-specific record types, if we don't want to club them
all together as XLOG_FPI records. Another thought is to add a reason
code to the XLOG_FPI record type. But there aren't that many callers of
log_newpage ATM, and most of them are very low volume, like the
buildempty AM methods to generate the init fork for unlogged indexes, so
it's not very urgent.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jirayut Nimsaeng 2014-11-24 09:55:50 BDR duplicate key value violates unique constraint error
Previous Message Alex Shulgin 2014-11-24 08:53:55 Re: Turning recovery.conf into GUCs