Re: foreign key locks, 2nd attempt

From: Noah Misch <noah(at)leadboat(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: foreign key locks, 2nd attempt
Date: 2012-01-19 02:11:35
Message-ID: 20120119021135.GA15158@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 18, 2012 at 05:18:31PM -0300, Alvaro Herrera wrote:
> Excerpts from Heikki Linnakangas's message of mar ene 17 03:21:28 -0300 2012:
> > On 16.01.2012 21:52, Alvaro Herrera wrote:
> > > I was initially thinking that pg_multixact should return the
> > > empty set if requested members of a multi that preceded the freeze
> > > point. That way, I thought, we would just never try to access a page
> > > originated in the older version (assuming the freeze point is set to
> > > "current" whenever pg_upgrade runs). However, as things currently
> > > stand, accessing an old multi raises an error. So maybe we need a
> > > scheme a bit more complex to handle this.
> >
> > Hmm, could we create new multixact files filled with zeros, covering the
> > range that was valid in the old cluster?
>
> Hm, we could do something like that I guess. I'm not sure that just
> zeroes is the right pattern, but it should be something simple.

PostgreSQL 9.1 can have all ~4B MultiXactId on disk at any given time.

We could silently ignore the lookup miss when HEAP_XMAX_LOCK_ONLY is also set.
That makes existing data files acceptable while still catching data loss
scenarios going forward. (It's tempting to be stricter when we know the
cluster data files originated in PostgreSQL 9.2+, but I'm not sure whether
that's worth its weight.)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-01-19 03:56:52 Re: age(xid) on hot standby
Previous Message Robert Haas 2012-01-19 01:34:13 Re: [v9.2] sepgsql's DROP Permission checks