aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/variable.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2025-03-29 16:36:51 -0400
committerAndres Freund <andres@anarazel.de>2025-03-29 16:36:51 -0400
commitd6d8054dc72d4844f52f1552f8d3074c16987e32 (patch)
treee7e38f0def6e40132c7ac705c36b2134a0700e66 /src/backend/commands/variable.c
parent08ccd56ac765496a152ba50cf0ae743c39396f52 (diff)
downloadpostgresql-d6d8054dc72d4844f52f1552f8d3074c16987e32.tar.gz
postgresql-d6d8054dc72d4844f52f1552f8d3074c16987e32.zip
localbuf: Track pincount in BufferDesc as well
For AIO on temporary table buffers the AIO subsystem needs to be able to ensure a pin on a buffer while AIO is going on, even if the IO issuing query errors out. Tracking the buffer in LocalRefCount does not work, as it would cause CheckForLocalBufferLeaks() to assert out. Instead, also track the refcount in BufferDesc.state, not just LocalRefCount. This also makes local buffers behave a bit more akin to shared buffers. Note that we still don't need locking, AIO completion callbacks for local buffers are executed in the issuing session (i.e. nobody else has access to the BufferDesc). Reviewed-by: Noah Misch <noah@leadboat.com> Discussion: https://postgr.es/m/uvrtrknj4kdytuboidbhwclo4gxhswwcpgadptsjvjqcluzmah%40brqs62irg4dt
Diffstat (limited to 'src/backend/commands/variable.c')
0 files changed, 0 insertions, 0 deletions