Skip site navigation (1) Skip section navigation (2)

GIN, XLogInsert and MarkBufferDirty

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: teodor(at)postgresql(dot)org
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: GIN, XLogInsert and MarkBufferDirty
Date: 2007-06-05 12:09:40
Message-ID: 46655284.9040004@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi Teodor,

I think there's a little bug in ginInsertValue. A page is marked as 
dirty with MarkBufferDirty after writing the corresponding WAL record 
with XLogInsert. That's not safe, MarkBufferDirty needs to be called 
before XLogInsert to avoid a race condition in checkpoint, see comments 
in SyncOneBuffer in bufmgr.c for an explanation.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Responses

pgsql-hackers by date

Next:From: Teodor SigaevDate: 2007-06-05 12:51:23
Subject: Re: GIN, XLogInsert and MarkBufferDirty
Previous:From: Richard HuxtonDate: 2007-06-05 09:45:54
Subject: Re: libpq and Binary Data Formats

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group