Re: Adding SMGR discriminator to buffer tags

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Shawn Debnath <sdn(at)amazon(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Adding SMGR discriminator to buffer tags
Date: 2019-07-15 22:49:39
Message-ID: CA+hUKGLf9aO8oxkbYQJbWJn=Wx+q-jS5_7Wp4Mxas49_R34nZA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 16, 2019 at 1:49 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> [long form -1]
>
> But how about just using a magic database OID?

This patch was just an experiment based on discussion here:

https://www.postgresql.org/message-id/flat/CA%2BhUKG%2BDE0mmiBZMtZyvwWtgv1sZCniSVhXYsXkvJ_Wo%2B83vvw%40mail.gmail.com

I learned some things. The main one is that you don't just need space
the buffer tag (which has plenty of spare bits) but also in WAL block
references, and that does seem to be a strike against the idea. I
don't want lack of agreement here to hold up other work. So here's
what I propose:

I'll go and commit the simple refactoring bits of this work, which
just move some stuff belonging to md.c out of smgr.c (see attached).
I'll go back to using a magic database OID for the undo log patch set
for now. We could always reconsider the SMGR discriminator later.
For now I'm not going to consider this question a blocker for the
later undo code when it's eventually ready for commit.

--
Thomas Munro
https://enterprisedb.com

Attachment Content-Type Size
0001-Move-some-md.c-specific-logic-from-smgr.c-to-md.c.patch application/octet-stream 7.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Karl O. Pinc 2019-07-15 23:15:57 Re: Patch to document base64 encoding
Previous Message Peter Geoghegan 2019-07-15 22:12:19 Use PageIndexTupleOverwrite() within nbtsort.c