Unreproducible bug in snapshot import code

From: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
To: PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Unreproducible bug in snapshot import code
Date: 2011-10-24 16:55:44
Message-ID: CABwTF4Usyv+hWu3i27fn2oPDG1p663wR36zg3bvd0BjQ2S_o5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi All,

I have not been able to reproduce this error, but wanted to report this
in case it might be useful.

Commit -id: 0f39d5050dc0dce99258381f33f1832c437aff85

Configure options:
--prefix=/mnt/storage/gurjeet/dev/builds//master/db --enable-debug
--enable-cassert CFLAGS=-O0 --enable-depend --enable-thread-safety
--with-openssl

Used VPATH to build postgres.

Attached files: terminal1.txt termonal2.txt config.log

Starting from line 89 of terminal1.txt we see this snippet:

postgres=# rollback;
ROLLBACK
postgres=# begin TRANSACTION ;
BEGIN
postgres=# set transaction snapshot '000002C8-1';
ERROR: SET TRANSACTION SNAPSHOT must be called before any query
postgres=# rollback;
ROLLBACK

As you can see the SET TRANSACTION SNAPSHOT was the first statement in
that transaction, and yet the ERROR message says that it is not. That
snapshot id was generated in another session (terminal2.txt), and was
generated outside any transaction; that's the only peculiar thing I can say
about that snapshot-id.

As is evident from the rest of the lines in terminal1.txt, I have not
been able to reproduce this error again; I tried even with a clean build of
the sources.

I have taken a look at the code and everything tells me that the error
should have been:

ERROR: a snapshot-importing transaction must have isolation level
SERIALIZABLE or REPEATABLE READ

Maybe it was not a clean build the first time, and the code may have
wrongly linked with previously compiled .o files.

Regards,
--
Gurjeet Singh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Attachment Content-Type Size
terminal1.txt text/plain 3.4 KB
terminal2.txt text/plain 448 bytes
config.log text/x-log 18.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2011-10-24 17:02:44 Re: [9.1] unusable for large views (SOLVED)
Previous Message Jan Urbański 2011-10-24 16:55:30 Re: [9.1] unusable for large views