| От | Tom Lane |
|---|---|
| Тема | Re: Detecting uncommitted changes |
| Дата | |
| Msg-id | 17932.1325032914@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Detecting uncommitted changes (Thomas Kellerer <spam_eater@gmx.net>) |
| Ответы |
Re: Detecting uncommitted changes
|
| Список | pgsql-general |
Thomas Kellerer <spam_eater@gmx.net> writes:
> Tom Lane wrote on 27.12.2011 20:22:
>> More specifically, look to see if the current transaction has assigned
>> itself a transaction ID. I think the easiest place to see this is in
>> pg_locks --- it will be holding exclusive lock on a TransactionId object
>> if so.
> Thanks for the answer. I came up with the following statement:
> select count(*)
> from pg_locks
> where pid = pg_backend_pid()
> and locktype in ('transactionid')
> does that look right to you?
No. You forgot the exclusive-lock condition.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера