Re: [HACKERS] BlowAwayRelationBuffers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
Cc: "Adriaan Joubert" <a(dot)joubert(at)albourne(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] BlowAwayRelationBuffers
Date: 2000-01-13 03:40:48
Message-ID: 11681.947734848@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
> I commited the following change to REL tree after 6.5.2.
> It might be late for Adriaan.

> ! if (SharedBufferChanged)
> TransactionIdAbort(xid);

> ! if (SharedBufferChanged && !TransactionIdDidCommit(xid))
> TransactionIdAbort(xid);

OK, I guess the point is that if VACUUM aborts at some time after
it's done its internal commit, this code would have un-done the
commit, thereby allowing HEAP_MOVED_OFF tuples to spring back to
life?

I was trying to figure out if this change might fix the duplicate-
tuples-after-failed-VACUUM problems that we've just been hearing
about. Certainly there is plenty of stuff going on in VACUUM after
its internal commit, so plenty of places that could elog(ERROR).
But it looks like the very first thing that happens after commit
is a scan to commit HEAP_MOVED_IN tuples and kill HEAP_MOVED_OFF
tuples, so this couldn't help much unless the failure happened
during that scan. Which doesn't seem really likely...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2000-01-13 03:52:12 Re: [HACKERS] libpq+MB/putenv(), getenv() clean up
Previous Message Bruce Momjian 2000-01-13 03:36:04 Re: [HACKERS] libpq+MB/putenv(), getenv() clean up