Re: Tablespaces

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Tablespaces
Date: 2004-06-16 21:11:18
Message-ID: Pine.LNX.4.58.0406170709320.6751@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Hi Tom,

On Wed, 16 Jun 2004, Tom Lane wrote:

> I'm starting to review this patch, and almost immediately came across
> what seemed a spectacularly bad idea:
>
> *** src/backend/storage/buffer/bufmgr.c 8 May 2004 19:09:25 -0000 1.165
> --- src/backend/storage/buffer/bufmgr.c 26 May 2004 06:21:01 -0000
> ***************
> *** 1148,1152 ****
> {
> bufHdr = &LocalBufferDescriptors[i];
> ! if (RelFileNodeEquals(bufHdr->tag.rnode, rnode))
> {
> bufHdr->flags &= ~(BM_DIRTY | BM_JUST_DIRTIED);
> --- 1148,1156 ----
> {
> bufHdr = &LocalBufferDescriptors[i];
> ! /* special case for default tblNode */
> ! if (RelFileNodeEquals(bufHdr->tag.rnode, rnode) ||
> ! (!OidIsValid(rnode.tblNode) &&
> ! bufHdr->tag.rnode.relNode == rnode.relNode &&
> ! bufHdr->tag.rnode.dbNode == rnode.dbNode))
> {
> bufHdr->flags &= ~(BM_DIRTY | BM_JUST_DIRTIED);
>
> There has got to be a better way than this. In the first place the
> code seems able to seize on the wrong buffer if it's not checking
> all three fields; in the second place, if the weak matching is correct
> here why is it not needed everyplace else?
>

Ahh. This is a hang over from some tests I was doing. I must have missed
it when I send the patch in. The patch should certainly work without this
change. I will verify later today when I have access to my development
machine.

Gavin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2004-06-16 22:02:29 Re: PITR Recovery
Previous Message Tom Lane 2004-06-16 19:17:53 Re: Tablespaces

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2004-06-16 22:45:36 Re: Nested transactions
Previous Message Tom Lane 2004-06-16 19:17:53 Re: Tablespaces