Skip site navigation (1) Skip section navigation (2)

Re: Refactoring log_newpage

From: Jim Nasby <jim(at)nasby(dot)net>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Refactoring log_newpage
Date: 2012-02-01 22:42:27
Message-ID: 4FF85E04-6418-4A84-8541-9A868ABA8D75@nasby.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On Feb 1, 2012, at 4:25 AM, Simon Riggs wrote:
> At present log_newpage() produces log records called XLOG_HEAP_NEWPAGE.
> 
> That routine is used by HEAP, BTREE, GIN, SPGIST rmgrs, as well as
> various forks.
> 
> WAL contains no information as to which rmgr the data refers to,
> making debugging much harder and skewing efforts to optimise WAL
> traffic and is a pretty gross modularity violation of the whole rmgr
> concept.
> 
> This refactoring adds an RmgrId field onto each new page record and
> makes clearer that certain "heap" routines are actually generic. The
> WAL records are still marked as HEAP rmgr and have XLOG_NEWPAGE record
> type, but at least we can tell them apart. (We already had forknum,
> just not rmgrid).


But we already had RelFileNode; wouldn't that be enough to tell what rmgr was responsible for the new page? Can 2 different rmgrs write to the same file node?
--
Jim C. Nasby, Database Architect                   jim(at)nasby(dot)net
512.569.9461 (cell)                         http://jim.nasby.net



In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2012-02-01 22:50:45
Subject: spgist text_ops and LIKE
Previous:From: Duncan RanceDate: 2012-02-01 22:37:32
Subject: Re: BUG #6425: Bus error in slot_deform_tuple

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group