Re: Bug in new buffer freelist code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Bug in new buffer freelist code
Date: 2003-12-23 22:32:43
Message-ID: 1581.1072218763@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
>> Let me know if there's any test I could run to confirm your theory,
>> assuming I can make it happen again after I finish rebuilding.

> You could add another assertion that checks that the CDB found is
> actually pointing to the buffer that is being invalidated.

Good thought. What would that look like exactly?

> Looking at the bufmgr.c code for FlushRelationBuffers() ... it does
> exactly what I described ... leaving the relnode and buffernum for an
> invalidated buffer just where they are.

Yeah. I don't think FlushRelationBuffers() is the place to fix it
though; if you try to fix it at that level there will be several places
to do it (DropBuffers etc). It's unclear to me what the division of
labor is now between BufTableDelete and freelist.c, so I'm not sure
where you *should* fix it ... but it should be as close as possible to
where the buffer is removed from the hashtable, IMHO.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ivelin Ivanov 2003-12-23 22:36:11 Re: PostgreSQL port to pure Java?
Previous Message Bruce Momjian 2003-12-23 22:13:29 Re: Quoting of psql \d output