Re: remove some STATUS_* symbols - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: remove some STATUS_* symbols
Date
Msg-id eb176922-2b1f-86d1-9ed4-e2c60a39b956@2ndquadrant.com
Whole thread Raw
In response to Re: remove some STATUS_* symbols  (Michael Paquier <michael@paquier.xyz>)
Responses Re: remove some STATUS_* symbols  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On 2020-01-06 07:31, Michael Paquier wrote:
> On Sun, Dec 29, 2019 at 11:33:34AM +0100, Peter Eisentraut wrote:
>> Attached are two patches to remove these two symbols.  STATUS_FOUND can be
>> replaced by a simple bool.  STATUS_WAITING is replaced by a separate enum.
> 
> Patch 0001 looks good to me, but I got to wonder why the check after
> waitMask in LockAcquireExtended() is not done directly in
> LockCheckConflicts().

You mean put he subsequent GrantLock() calls into LockCheckConflicts()? 
That would technically save some duplicate code, but it seems weird, 
because LockCheckConflicts() is notionally a read-only function that 
shouldn't change state.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [PATCH] Resolve Parallel Hash Join Performance Issue
Next
From: Amit Langote
Date:
Subject: Re: adding partitioned tables to publications