postgresql/src/include/storage
Robert Haas 2346df6fc3 Allow a no-wait lock acquisition to succeed in more cases.
We don't determine the position at which a process waiting for a lock
should insert itself into the wait queue until we reach ProcSleep(),
and we may at that point discover that we must insert ourselves ahead
of everyone who wants a conflicting lock, in which case we obtain the
lock immediately. Up until now, a no-wait lock acquisition would fail
in such cases, erroneously claiming that the lock couldn't be obtained
immediately.  Fix that by trying ProcSleep even in the no-wait case.

No back-patch for now, because I'm treating this as an improvement to
the existing no-wait feature. It could instead be argued that it's a
bug fix, on the theory that there should never be any case whatsoever
where no-wait fails to obtain a lock that would have been obtained
immediately without no-wait, but I'm reluctant to interpret the
semantics of no-wait that strictly.

Robert Haas and Jingxian Li

Discussion: http://postgr.es/m/CA+TgmobCH-kMXGVpb0BB-iNMdtcNkTvcZ4JBxDJows3kYM+GDg@mail.gmail.com
2024-03-14 08:56:06 -04:00
..
.gitignore When trace_lwlocks is used, identify individual lwlocks by name. 2015-09-11 14:01:39 -04:00
barrier.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
block.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
buf.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
buf_internals.h Add missing PGDLLIMPORT markings 2024-01-16 13:53:28 +02:00
buffile.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
bufmgr.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
bufpage.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
bulk_write.h Fix compiler warning on typedef redeclaration 2024-02-23 17:39:27 +02:00
checksum.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
checksum_impl.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
condition_variable.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
copydir.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
dsm.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
dsm_impl.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
dsm_registry.h Introduce the dynamic shared memory registry. 2024-01-19 14:24:36 -06:00
fd.h Return ssize_t in fd.c I/O functions. 2024-03-02 12:09:28 +13:00
fileset.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
freespace.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
fsm_internals.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
indexfsm.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
ipc.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
item.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
itemid.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
itemptr.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
large_object.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
latch.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
lmgr.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
lock.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
lockdefs.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
lwlock.h Improve performance of subsystems on top of SLRU 2024-02-28 17:05:31 +01:00
md.h Introduce a new smgr bulk loading facility. 2024-02-23 16:10:51 +02:00
meson.build Cross-check lists of predefined LWLocks. 2024-01-09 11:05:19 -06:00
off.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_sema.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pg_shmem.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pmsignal.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
predicate.h Improve performance of subsystems on top of SLRU 2024-02-28 17:05:31 +01:00
predicate_internals.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
proc.h Allow a no-wait lock acquisition to succeed in more cases. 2024-03-14 08:56:06 -04:00
procarray.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
proclist.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
proclist_types.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
procnumber.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
procsignal.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
reinit.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
relfilelocator.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
s_lock.h Remove AIX support 2024-02-28 15:17:23 +04:00
sharedfileset.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
shm_mq.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
shm_toc.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
shmem.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
sinval.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
sinvaladt.h Redefine backend ID to be an index into the proc array 2024-03-03 19:37:28 +02:00
smgr.h Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
spin.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
standby.h Fix false reports in pg_visibility 2024-03-14 13:12:05 +02:00
standbydefs.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
sync.h Update copyright for 2024 2024-01-03 20:49:05 -05:00