Re: [COMMITTERS] pgsql: Reset 'ps' display just once when resolving VXID conflicts.

Поиск
Список
Период
Сортировка
Искать

Re: [COMMITTERS] pgsql: Reset 'ps' display just once when resolving VXID conflicts.

От:
Robert Haas <robertmhaas@gmail.com>
Дата:
Вложения:
On Fri, Dec 17, 2010 at 9:52 AM, Tom Lane  wrote:
> Robert Haas  writes:
>> Reset 'ps' display just once when resolving VXID conflicts.
>> This prevents the word "waiting" from briefly disappearing from the ps
>> status line when ResolveRecoveryConflictWithVirtualXIDs begins a new
>> iteration of the outer loop.
>
> I imagine the reason for the original coding was to avoid a useless
> gettimeofday kernel call in the common case that there are no
> conflicting xacts to wait for.  Could we restore that behavior?

Something like the attached?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: [COMMITTERS] pgsql: Reset 'ps' display just once when resolving VXID conflicts.

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Robert Haas  writes:
> On Fri, Dec 17, 2010 at 9:52 AM, Tom Lane  wrote:
>> I imagine the reason for the original coding was to avoid a useless
>> gettimeofday kernel call in the common case that there are no
>> conflicting xacts to wait for. �Could we restore that behavior?

> Something like the attached?

I would just add the return-at-the-top.  Changing the loop logic is
not necessary --- the loop test is cheap.
		regards, tom lane

Re: [COMMITTERS] pgsql: Reset 'ps' display just once when resolving VXID conflicts.

От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Fri, Dec 17, 2010 at 11:20 AM, Tom Lane  wrote:
> Robert Haas  writes:
>> On Fri, Dec 17, 2010 at 9:52 AM, Tom Lane  wrote:
>>> I imagine the reason for the original coding was to avoid a useless
>>> gettimeofday kernel call in the common case that there are no
>>> conflicting xacts to wait for.  Could we restore that behavior?
>
>> Something like the attached?
>
> I would just add the return-at-the-top.  Changing the loop logic is
> not necessary --- the loop test is cheap.

Hmm... that's a fine bit of hairsplitting, but OK.

Done that way, then.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

FAQ