On Wed, May 4, 2022 at 12:16 PM Chris Cleveland
wrote:
> Similar code is repeated in a bunch of places. Each access method has to
> explicitly write something into a freed page that identifies it as ok to use.
I wouldn't say that that's what this code is doing, though I do see
what you mean. The
Chris Cleveland writes:
> Would it make sense to make GetFreeIndexPage() atomic?
I strongly doubt it. The loss of concurrency would outweigh any
code-simplicity benefits.
regards, tom lane
Would it make sense to make GetFreeIndexPage() atomic?
Internally, GetFreeIndexPage() calls GetPageWithFreeSpace() and then
RecordUsedIndexPage() in two separate operations. It's possible for two
different processes to get the same free page at the same time.
To guard against this, there are seve