Re: this is in plain text (row level locks)

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: this is in plain text (row level locks)
Дата
Msg-id 1059041654.24535.13.camel@jester
обсуждение исходный текст
Ответ на Re: this is in plain text (row level locks)  (Sailesh Krishnamurthy <sailesh@cs.berkeley.edu>)
Ответы Re: this is in plain text (row level locks)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, 2003-07-24 at 02:45, Sailesh Krishnamurthy wrote:
> >>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>
>     Tom> That doesn't work, unless you insist that the first backend
>     Tom> can't exit its transaction until all the other ones are done.
>     Tom> Which introduces its own possibilities for deadlock --- but
>     Tom> even worse, how does the first backend *know* that the other
>     Tom> ones are done?  You're right back where you started: it has
>     Tom> to be possible to tell which backends have share-locked a
>     Tom> particular row.
>
> Is a count a solution ?

Almost.  Problem with a count is the difficulty decrementing the count
after a crash.  You would also need to store a log of some kind so you
know what to reset while starting up in error recovery mode which would
add a large amount of overhead.

It may be best to have a locking manager run as a separate process.
That way it could store locks in ram or spill over to disk. Now the
problem is communication overhead. It probably isn't any worse than
writing them to disk for long queries (actual disk activity resulting),
but short queries are probably going to notice.


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

Предыдущее
От: Lee Kindness
Дата:
Сообщение: libpq_r
Следующее
От: Patrick Welche
Дата:
Сообщение: Re: cvs problem