Re: a modest improvement to get_object_address()
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2011-11-09T15:33:10Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Try to acquire relation locks in RangeVarGetRelid.
- 4240e429d0c2 9.2.0 cited
Robert Haas <robertmhaas@gmail.com> writes: > On Wed, Nov 9, 2011 at 9:54 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> I would think you need to drop the now-useless lock, and I sure hope >> that RangeVarGetRelid does likewise. > It doesn't currently. The now-useless lock doesn't really hurt > anything, aside from taking up space in the lock table. Well, there are corner cases where the object OID gets reused during the lifetime of the transaction, and then the lock *does* do something (and what it does would be bad). But taking up extra space in the finite-size lock table is sufficient reason IMO to drop the lock. It's not like these are performance-critical code paths. regards, tom lane