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

Re: pgsql/src backend/tcop/postgres.c include/misc ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql/src backend/tcop/postgres.c include/misc ...
Date: 2002-01-07 04:54:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> I think the much more significant change is the following
> one not the above one.

Well, yes; the "above" change was just a last-gasp attempt to make the
old scheme work, whereas the "following" change introduced the new

But there is no way that we can allow proc_exit to be invoked at any
random instant; it has to be constrained to places where all the
infrastructure state is consistent.  (Or at least all the state of
the infrastructure modules that proc_exit will invoke.  But that
covers an awful lot of territory.)

In particular, since routines invoked during proc_exit rely on both
shared and private state, I don't believe it can be safe to allow
proc_exit at any spinlock boundary.  We could possibly make it safe
by introducing enough HOLD/RESUME_INTERRUPTS calls --- but that
direction requires that we be forever vigilant to ensure that we've
locked interrupts everywhere we have to; and there's no way to notice
if we've failed to.  I'd much rather take the other approach of allowing
the interrupt only at certain specified spots.  The failure mode here is
that a cancel/die interrupt doesn't get handled as soon as you'd like.
I consider that better than the failure mode of the other approach,
which could be undetected data corruption.

			regards, tom lane

In response to


pgsql-committers by date

Next:From: meskesDate: 2002-01-07 16:25:50
Subject: pgsql/src/interfaces/ecpg ChangeLog preproc/pr ...
Previous:From: Hiroshi InoueDate: 2002-01-07 04:36:22
Subject: Re: pgsql/src backend/tcop/postgres.c include/misc ...

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