locks held during commit with synchronous replication

Поиск
Список
Период
Сортировка
От Torsten Förtsch
Тема locks held during commit with synchronous replication
Дата
Msg-id 5265586E.10800@gmx.net
обсуждение исходный текст
Ответы Re: locks held during commit with synchronous replication
Список pgsql-general
Hi,

I noticed that with synchronous replication I often see locks like this:

-[ RECORD 10 ]-----+--------------------
locktype           | object
database           | 0
relation           |
page               |
tuple              |
virtualxid         |
transactionid      |
classid            | 1262
objid              | 0
objsubid           | 0
virtualtransaction | 13/42806
pid                | 9794
mode               | AccessExclusiveLock
granted            | t
fastpath           | f

According to the manual classid is an oid in pg_class. If so, the 1262
resolves to pg_database. What objid=0 means, I have no idea.

For how long is this lock held?

Am I right in assuming that it is held from the start of the commit
until the transaction is streamed and written to disk by the synchronous
replica?

Does that mean that only one transaction can be committed at a time? I
have to admit I haven't thought much about that before. Lock contention
has never been a problem here.

Thanks,
Torsten


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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: pg_dump resulting in excessive memory use by postmaster process
Следующее
От: Moshe Jacobson
Дата:
Сообщение: Re: Bug? Function with side effects not evaluated in CTE