Re: remove some STATUS_* symbols

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: remove some STATUS_* symbols
Date: 2020-01-09 10:15:08
Message-ID: eb176922-2b1f-86d1-9ed4-e2c60a39b956@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2020-01-09 10:26:58 Re: adding partitioned tables to publications
Previous Message Thomas Munro 2020-01-09 10:04:27 Re: [PATCH] Resolve Parallel Hash Join Performance Issue