Re: [HACKERS] Walsender timeouts and large transactions

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: [HACKERS] Walsender timeouts and large transactions
Дата
Msg-id cb3d5ccd-de0e-c29d-0b1f-7e38142d0df3@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Walsender timeouts and large transactions  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Ответы Re: [HACKERS] Walsender timeouts and large transactions  (Yura Sokolov <funny.falcon@postgrespro.ru>)
Список pgsql-hackers
On 30/05/17 15:44, Petr Jelinek wrote:
> On 30/05/17 11:02, Kyotaro HORIGUCHI wrote:
>>
>> +    TimestampTz    now = GetCurrentTimestamp();
>>
>> I think it is not recommended to read the current time too
>> frequently, especially within a loop that hates slowness. (I
>> suppose that a loop that can fill up a send queue falls into that
> 
> Yeah that was my main worry for the patch as well, although given that
> the loop does tuple processing it might not be very noticeable.
> 

I realized we actually call GetCurrentTimestamp() there anyway (for the
pq_sendint64). So I just modified the patch to use the now variable
there instead which means there are no additional GetCurrentTimestamp()
calls compared to state before patch now.

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

-- 
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 по дате отправления:

Предыдущее
От: Petr Jelinek
Дата:
Сообщение: Re: [HACKERS] Logical replication: stuck spinlock atReplicationSlotRelease
Следующее
От: Tom Lane
Дата:
Сообщение: [HACKERS] CREATE COLLATION definitional questions for ICU