Re: released savepoint blocking further statements

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: released savepoint blocking further statements
Дата
Msg-id CAMkU=1xA+9izwMjVzFVs9modUY5PmoJQdUEpL89DTbayyRAcAw@mail.gmail.com
обсуждение исходный текст
Ответ на released savepoint blocking further statements  (Miklós Fazekas <mfazekas@szemafor.com>)
Ответы Re: released savepoint blocking further statements  (Miklós Fazekas <mfazekas@szemafor.com>)
Список pgsql-bugs
On Thu, Apr 7, 2016 at 1:26 AM, Mikl=C3=B3s Fazekas <mfazekas@szemafor.com>=
 wrote:


> [2.] I've tried to use the query Lock Monitoring wiki from to find out wh=
at
> is blocking:
>
> it shows that 79469 | RELEASE SAVEPOINT active_record_2_47 is the
> current_statement_in_blocking_process.
>
> https://wiki.postgresql.org/wiki/Lock_Monitoring
>
> SELECT bl.pid                 AS blocked_pid,
>
>          a.usename              AS blocked_user,
>          ka.query               AS current_statement_in_blocking_process,
>          now() - ka.query_start AS blocking_duration,
>          kl.pid                 AS blocking_pid,
>          ka.usename             AS blocking_user,
>          a.query                AS blocked_statement,
>          now() - a.query_start  AS blocked_duration
>   FROM  pg_catalog.pg_locks         bl
>    JOIN pg_catalog.pg_stat_activity a  ON a.pid =3D bl.pid
>    JOIN pg_catalog.pg_locks         kl ON kl.transactionid =3D
> bl.transactionid AND kl.pid !=3D bl.pid
>    JOIN pg_catalog.pg_stat_activity ka ON ka.pid =3D kl.pid
>   WHERE NOT bl.GRANTED;


That is probably not the current statement in the blocking process.
It is likely that the blocking process is in the state "idle in
transaction", and the RELEASE SAVEPOINT is actually the most recent
statement, not the current statement.

I've updated the wiki to clarify that, but it could use some more polishing=
.

So your savepoint release has executed successfully, but the outer
transaction is still holding on to locks which block the other
process.  You have to convince that outer transaction to either commit
or rollback.

Cheers,

Jeff

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: [HACKERS] BUG #13854: SSPI authentication failure: wrong realm name used
Следующее
От: jacksonemmerich@gmail.com
Дата:
Сообщение: BUG #14077: Error with pgadim v1.22.1 and ubuntu 15.10 + postgres 9.2