- Архив списков рассылки pgsql-general

Поиск
Список
Период
Сортировка
От Michael Vodep
Тема
Дата
Msg-id 9660.1076407567@www25.gmx.net
обсуждение исходный текст
Список pgsql-general
Hi!
I have a table called "tbltest". There i want to avoid multiple updates at
the same time. so i tried to use the transaction method.
transaction 1                                              transaction 2
BEGIN;
SET TRANSACTION ISOLATION LEVEL
SERIALIZABLE;
SELECT * FROM tbltest WHERE id=0
FOR UPDATE;
                                                                 UPDATE
tbltest SET col1='test' WHERE id=0;

The update statement (transaction 2) waits, until i commited the transaction
1. How can i avoid this waiting? is it possible to get an error like "ERROR:
 id 0 is currently not available" - or somethink like this :-)

Thanks!!!
Michael

--
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++


В списке pgsql-general по дате отправления:

Предыдущее
От: "William ZHANG"
Дата:
Сообщение: Re: pg_class and relfilenode
Следующее
От: steven_c_job@yahoo.com (Steven job)
Дата:
Сообщение: Best replication options