Re: Latest version of Hot Standby patch

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Latest version of Hot Standby patch
Date: 2008-12-18 15:42:34
Message-ID: 1229614954.4793.431.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Thu, 2008-12-18 at 15:13 +0200, Heikki Linnakangas wrote:

> Can't we use the existing backendid in place of the slot id?
>
> (sorry if this has been discussed already; can't remember)

Exactly the sort of question we need, but unfortunately I'm a little
hazy, but I just woke up some maybe some coffee will change that answer
later.

They're certainly related and I did try it initially. SlotId was not
present in early versions of the patch up to 13 Oct, though backendId
was.

IIRC there were a couple of reasons

* corner case behaviour of backendids - bgwriter writes checkpoint WAL
records. Has no backendid, but needs a slotid (possibly others)

* slotids are assigned once and never changed, so allowing them to be
used as array lookups directly

I think it would be possible to use slotids as backendids, but not the
other way around. Anyway, seemed like a great way to induce bugs into
the sinval code, so I didn't try too hard to make them identical.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-12-18 17:07:20 Re: [ADMIN] shared_buffers and shmmax
Previous Message Andrew Gierth 2008-12-18 15:02:03 Re: uuids on freebsd