Re: Slow standby snapshot

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Slow standby snapshot
Дата
Msg-id 1249332.1668553589@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Slow standby snapshot  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Slow standby snapshot  (Simon Riggs <simon.riggs@enterprisedb.com>)
Список pgsql-hackers
BTW, while nosing around this code I came across this statement
(procarray.c, about line 4550 in HEAD):

 * ... To add XIDs to the array, we just insert
 * them into slots to the right of the head pointer and then advance the head
 * pointer.  This wouldn't require any lock at all, except that on machines
 * with weak memory ordering we need to be careful that other processors
 * see the array element changes before they see the head pointer change.
 * We handle this by using a spinlock to protect reads and writes of the
 * head/tail pointers.  (We could dispense with the spinlock if we were to
 * create suitable memory access barrier primitives and use those instead.)
 * The spinlock must be taken to read or write the head/tail pointers unless
 * the caller holds ProcArrayLock exclusively.

Nowadays we've *got* those primitives.  Can we get rid of
known_assigned_xids_lck, and if so would it make a meaningful
difference in this scenario?

            regards, tom lane



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: SUBTRANS: Minimizing calls to SubTransSetParent()
Следующее
От: Juan José Santamaría Flecha
Дата:
Сообщение: Meson add host_system to PG_VERSION_STR