Re: unlogged tables vs. GIST

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: unlogged tables vs. GIST
Date: 2010-12-17 19:32:20
Message-ID: AANLkTinTHZU9nx0xvezEYMTg+Wb34if2DqODuR1-8qg+@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 17, 2010 at 2:22 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> On 17.12.2010 21:07, Tom Lane wrote:
>>> IIUC, the problem is that the bufmgr might think that a GIST NSN is an
>>> LSN that should affect when to force out a dirty buffer?  What if we
>>> taught it the difference?  We could for example dedicate a pd_flags
>>> bit to marking pages whose pd_lsn isn't actually an LSN.
>
>> I'm not very fond of expanding buffer manager's knowledge of the page
>> layout. How about a new flag in the buffer desc, BM_UNLOGGED?
>
> That could work too, if you can explain how the flag comes to be set
> without a bunch of ugliness all over the system.  I don't want callers
> of ReadBuffer to have to supply the bit for example.

That's easy enough to solve - ReadBuffer() takes a Relation as an
argument, so you can easily check RelationNeedsWAL(reln).

I guess the question is whether it's right to conflate "table is
unlogged" with "LSN is fake". It's not immediately obvious to me that
those concepts are isomorphic, although though the reverse isn't
obvious to me either.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-12-17 19:33:28 Re: unlogged tables vs. GIST
Previous Message Tom Lane 2010-12-17 19:31:41 Re: unlogged tables vs. GIST