Re: [HACKERS] Early locking option to parallel backup

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Early locking option to parallel backup
Дата
Msg-id 14976.1509939814@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Early locking option to parallel backup  (Andres Freund <andres@anarazel.de>)
Ответы Re: [HACKERS] Early locking option to parallel backup
Re: [HACKERS] Early locking option to parallel backup
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> Well, the current approach afaics requires #relations * 2 locks, whereas
> acquiring them in every worker would scale that with the number of
> workers.

Yeah, that's gonna be a problem with this proposal.

> IIUC the problem here is that even though a lock is already
> held by the main backend an independent locker's request will prevent
> the on-demand lock by the dump worker from being granted.  It seems to
> me the correct fix here would be to somehow avoid the fairness logic in
> the parallel dump case - although I don't quite know how to best do so.

I wonder if we couldn't somehow repurpose the work that was done for
parallel workers' locks.  Lots of security-type issues to be handled
if we're to open that up to clients, but maybe it's solvable.  For
instance, maybe only allowing it to clients sharing the same snapshot
would help.
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] why not parallel seq scan for slow functions
Следующее
От: David Rowley
Дата:
Сообщение: Re: [HACKERS] path toward faster partition pruning