Re: [POSTGRESQL] LOCKING A ROW

Поиск
Список
Период
Сортировка
От William N. Zanatta
Тема Re: [POSTGRESQL] LOCKING A ROW
Дата
Msg-id 3CD6968B.8030403@veritel.com.br
обсуждение исходный текст
Ответ на [POSTGRESQL] LOCKING A ROW  ("Jesus Contreras" <jcontreras@isoco.com>)
Список pgsql-general
Hey,

   Try some reading at this location...

   The Practical PostgreSQL Book (LOCK)
   http://www.commandprompt.com/ppbook/index.lxp?lxpwrap=r27479%2ehtm

   You're in a kind of race condition and you're not managing processes
very well. The row-locks you want are automatically obtained by the
     SELECT ... FOR UPDATE
     UPDATE...
and INSERT...

   I'm also new to PostgreSQL and I'm still exploring the capabilities
and thinking in possibilities. I don't know whether it is for this kind
of use but take a look at LISTEN and NOTIFY keywords. They provide
together a kind of IPC management.

   In theory you can LISTEN for 'ok' in the 2nd process and when the
first finishes what it is doing, it NOTIFies an 'ok', so the 2nd process
takes action and starts its works while the first one LISTENs for 'ok'
and so on...

   Remember, I'm not a guru, it is just a suggestion...I don't even know
whether it will work or not for you.

William


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

Предыдущее
От: "Joel Burton"
Дата:
Сообщение: Re: [CYGWIN] Using B-Tree index for such kind of queries (with '>','<')
Следующее
От: "Joel Burton"
Дата:
Сообщение: Re: HOWTO - Random character generation for primary key