Re: remove some STATUS_* symbols
Peter Eisentraut <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.devel.general |
|---|---|
| Organization | 2ndQuadrant |
| Message-ID | <[email protected]> |
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