Re: pg_relation_size locking

Поиск
Список
Период
Сортировка
От Andreas Pflug
Тема Re: pg_relation_size locking
Дата
Msg-id 439D96C8.6090405@pse-consulting.de
обсуждение исходный текст
Ответ на Re: pg_relation_size locking  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_relation_size locking  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Andreas Pflug <pgadmin@pse-consulting.de> writes:
> 
>>Until recently, pg_relation_size used SearchSysCache to locate the 
>>relation to examine, and calculated the file location from that 
>>information. Starting with dbsize.c V1.5 (committed after Beta2), 
>>relation_open(.., AccessShareLock) is used. This is very unfortunate 
>>because it will not allow to observe a table growing while it is 
>>populated, e.g. with a lengthy COPY; pg_relation_size will be blocked. 
> 
> 
> Nonsense.

Ahem.

I'm running Slony against a big replication set. While slon runs COPY 
foo(colnamelist) FROM STDIN, I can't execute pg_relation_size(foo_oid). 
pg_locks will show that the AccessShareLock on foo is not granted.

Problem is gone with reverted dbsize.c

Regards,
Andreas


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_relation_size locking
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_relation_size locking