Thread: pgsql/src/backend/commands sequence.c

pgsql/src/backend/commands sequence.c

From
"Vadim B. Mikheev - CVS"
Date:
CVSROOT:    /home/projects/pgsql/cvsroot
Module name:    pgsql
Changes by:    vadim@hub.org    01/04/03 17:58:00

Modified files:
    src/backend/commands: sequence.c

Log message:
    Log sequence creation (to initialize magic number on recovery).


Re: pgsql/src/backend/commands sequence.c

From
Tom Lane
Date:
"Vadim B. Mikheev - CVS" <vadim@hub.org> writes:
> Modified files:
>     src/backend/commands: sequence.c

> Log message:
>     Log sequence creation (to initialize magic number on recovery).

This change has at least one serious bug: you access and update the
sequence's buffer after you have done ReleaseBuffer.  Shouldn't the
ReleaseBuffer call be after the critical section?

Also, why'd you replace WriteBuffer with ReleaseBuffer anyway?  Doesn't
the buffer need to get marked dirty here??

            regards, tom lane