pgsql: Forbid setval() during recovery.

Started by Nonamealmost 16 years ago3 messages
#1Noname
heikki@postgresql.org

Log Message:
-----------
Forbid setval() during recovery. This prevents the PANIC reported by
Erik Rijkers. Patch by Andres Freund.

Modified Files:
--------------
pgsql/src/backend/commands:
sequence.c (r1.166 -> r1.167)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/sequence.c?r1=1.166&r2=1.167)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: [COMMITTERS] pgsql: Forbid setval() during recovery.

heikki@postgresql.org (Heikki Linnakangas) writes:

Forbid setval() during recovery. This prevents the PANIC reported by
Erik Rijkers. Patch by Andres Freund.

ISTM this is the wrong fix. The real bug is that setval() doesn't
check XactReadOnly. Now XactReadOnly is only a "soft" read only
mode, but I don't see an argument for either setval() or nextval()
to be allowed when that's set.

Any objections to changing that?

regards, tom lane

#3Andres Freund
andres@anarazel.de
In reply to: Tom Lane (#2)
Re: [COMMITTERS] pgsql: Forbid setval() during recovery.

On Saturday 20 February 2010 17:34:50 Tom Lane wrote:

heikki@postgresql.org (Heikki Linnakangas) writes:

Forbid setval() during recovery. This prevents the PANIC reported by
Erik Rijkers. Patch by Andres Freund.

ISTM this is the wrong fix. The real bug is that setval() doesn't
check XactReadOnly. Now XactReadOnly is only a "soft" read only
mode, but I don't see an argument for either setval() or nextval()
to be allowed when that's set.

Any objections to changing that?

Not from my side - sounds more sensible...

Andres