postgresql/src/backend/access
Robert Haas d18e75664a Remove CheckpointLock.
Up until now, we've held this lock when performing a checkpoint or
restartpoint, but commit 076a055acf back
in 2004 and commit 7e48b77b1c from 2009,
taken together, have removed all need for this. In the present code,
there's only ever one process entitled to attempt a checkpoint: either
the checkpointer, during normal operation, or the postmaster, during
single-user operation. So, we don't need the lock.

One possible concern in making this change is that it means that
a substantial amount of code where HOLD_INTERRUPTS() was previously
in effect due to the preceding LWLockAcquire() will now be
running without that. This could mean that ProcessInterrupts()
gets called in places from which it didn't before. However, this
seems unlikely to do very much, because the checkpointer doesn't
have any signal mapped to die(), so it's not clear how,
for example, ProcDiePending = true could happen in the first
place. Similarly with ClientConnectionLost and recovery conflicts.

Also, if there are any such problems, we might want to fix them
rather than reverting this, since running lots of code with
interrupt handling suspended is generally bad.

Patch by me, per an inquiry by Amul Sul. Review by Tom Lane
and Michael Paquier.

Discussion: http://postgr.es/m/CAAJ_b97XnBBfYeSREDJorFsyoD1sHgqnNuCi=02mNQBUMnA=FA@mail.gmail.com
2021-01-25 12:34:38 -05:00
..
brin Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
common Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
gin Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
gist Fix bug in detecting concurrent page splits in GiST insert 2021-01-20 11:58:03 +02:00
hash Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
heap Remove CheckpointLock. 2021-01-25 12:34:38 -05:00
index Enhance nbtree index tuple deletion. 2021-01-13 09:21:32 -08:00
nbtree Enhance nbtree index tuple deletion. 2021-01-13 09:21:32 -08:00
rmgrdesc Enhance nbtree index tuple deletion. 2021-01-13 09:21:32 -08:00
spgist Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
table Enhance nbtree index tuple deletion. 2021-01-13 09:21:32 -08:00
tablesample Update copyright for 2021 2021-01-02 13:06:25 -05:00
transam Remove CheckpointLock. 2021-01-25 12:34:38 -05:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00