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

Re: [COMMITTERS] pgsql: Fix race condition in multixact code: it's possible

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Fix race condition in multixact code: it's possible
Date: 2005-10-28 17:48:42
Message-ID: 200510281748.j9SHmgu18148@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-patches
Does this need to be backpatched?

---------------------------------------------------------------------------

Tom Lane wrote:
> Log Message:
> -----------
> Fix race condition in multixact code: it's possible to try to read a
> multixact's starting offset before the offset has been stored into the
> SLRU file.  A simple fix would be to hold the MultiXactGenLock until the
> offset has been stored, but that looks like a big concurrency hit.  Instead
> rely on knowledge that unset offsets will be zero, and loop when we see
> a zero.  This requires a little extra hacking to ensure that zero is never
> a valid value for the offset.  Problem reported by Matteo Beccati, fix
> ideas from Martijn van Oosterhout, Alvaro Herrera, and Tom Lane.
> 
> Modified Files:
> --------------
>     pgsql/src/backend/access/transam:
>         multixact.c (r1.9 -> r1.10)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/multixact.c.diff?r1=1.9&r2=1.10)
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-committers by date

Next:From: Tom LaneDate: 2005-10-28 17:52:00
Subject: Re: [COMMITTERS] pgsql: Fix race condition in multixact code: it's possible to try to
Previous:From: Tom LaneDate: 2005-10-28 17:32:23
Subject: pgsql: Clean up AIX build to avoid 'duplicate symbol' warnings, by

pgsql-patches by date

Next:From: Tom LaneDate: 2005-10-28 17:52:00
Subject: Re: [COMMITTERS] pgsql: Fix race condition in multixact code: it's possible to try to
Previous:From: Tom LaneDate: 2005-10-28 17:27:30
Subject: pgsql: Fix race condition in multixact code: it's possible to try to

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