From: | Devrim GUNDUZ <devrim(at)gunduz(dot)org> |
---|---|
To: | pgsql-hackers(at)PostgreSQL(dot)org |
Subject: | Two questions about savepoints: Bug or feature? |
Date: | 2004-08-03 13:49:21 |
Message-ID: | Pine.LNX.4.44.0408031642360.24680-100000@emo.org.tr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I updated the CVS a few minutes before, applied Gavin Sherry's latest
xact patch. It worked.
Anyway...here is what I did:
==================Case 1=================================
test=# BEGIN ;
BEGIN
test=# SAVEPOINT devrim;
SAVEPOINT
test=# SAVEPOINT devrim;
SAVEPOINT
test=# SAVEPOINT devrim;
SAVEPOINT
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK
...and it goes on forever. Is it a feature or a bug?
Now case 2:
==================Case 2=================================
test=# BEGIN ;
BEGIN
test=# INSERT INTO a VALUES ('123');
INSERT 17231 1
test=# INSERT INTO a VALUES ('1dfsd');
INSERT 17232 1
test=# SAVEPOINT devrim;
SAVEPOINT
test=# DELETE from a WHERE x ='123';
DELETE 1
test=# SAVEPOINT devrim;
SAVEPOINT
test=# DELETE from a WHERE x ='123';
DELETE 0
test=# SAVEPOINT devrim;
SAVEPOINT
test=# DELETE from a WHERE x ='1dfsd';
DELETE 1
test=# SELECT * from a ;
x
- ---
(0 rows)
test=# ROLLBACK to devrim;
ROLLBACK
test=# SELECT * from a ;
x
- -------
1dfsd
(1 row)
test=# ROLLBACK to devrim;
ROLLBACK
test=# SELECT * from a ;
x
- -------
1dfsd
(1 row)
test=# COMMIT ;
COMMIT
test=# SELECT * from a ;
x
- -------
1dfsd
========================================
Are these all intended behaviors? I thought we wouldn't be able to give
more than 1 same name to savepoints in a transaction, am I right?
Regards,
- --
Devrim GUNDUZ
devrim~gunduz.org devrim.gunduz~linux.org.tr
http://www.tdmsoft.com
http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFBD5fitl86P3SPfQ4RAuErAKDYC33X4CjYmv6TuoddJaBkl7TKYgCeN6ZF
/0Ky5+BWo1wFFNBdMpQ6txw=
=XV4n
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2004-08-03 13:58:43 | Re: Two questions about savepoints: Bug or feature? |
Previous Message | Greg Sabino Mullane | 2004-08-03 13:44:12 | Re: Open items |