Help with "locking" please

Поиск
Список
Период
Сортировка
От Boris Popov
Тема Help with "locking" please
Дата
Msg-id 48281290193.20031106152537@procedium.com
обсуждение исходный текст
Ответы Re: [NOVICE] Help with "locking" please
Список pgsql-general
Hello,

Here's a scenario I am trying to find a solution for. I have a
contacts table individual rows of which can be edited in our app. I'd
like to be able to mark a row as 'opened by someone else' when editor
is opened and un-mark it when window is closed. No problems there, I
could add a procpid(int4) column and update it with current process'
PID on window open and with null on window close. One case however is
an unexpected error where client app doesn't reset the procpid to
null and that's a problem I'm trying to solve.

My first instict would be to make procpid reference
pg_stat_activity(procpid), but of course that's a view, so its not
going to fly.

What's a common pattern that deals with these kinds of issues? I'd
like to be able to do this in other areas of the application also.

Any help will be appreciated!

--
-Boris



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

Предыдущее
От: Darren Ferguson
Дата:
Сообщение: Re: create function for trigger question
Следующее
От: "Craig O'Shannessy"
Дата:
Сообщение: Re: Optimiser desicion bringing system to its knees?