Lists: | pgsql-hackers |
---|
From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Change in HEAP_NEWPAGE logging makes diagnosis harder |
Date: | 2014-10-30 14:12:03 |
Message-ID: | 20141030141203.GF8151@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
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?
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
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-14 08:17:24 |
Message-ID: | 5465BA94.2010205@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
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.
- Heikki
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 |
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