Unreproducible bug in snapshot import code
Gurjeet Singh <singh.gurjeet@gmail.com>
From: Gurjeet Singh <singh.gurjeet@gmail.com>
To: PGSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2011-10-24T16:55:44Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Don't trust deferred-unique indexes for join removal.
- 0f39d5050dc0 9.2.0 cited
Attachments
- terminal1.txt (text/plain)
- terminal2.txt (text/plain)
- config.log (text/x-log)
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