aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/tablecmds.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2025-03-14 20:39:43 +1300
committerThomas Munro <tmunro@postgresql.org>2025-03-14 21:21:09 +1300
commit92fc6856cb4c598f99c58b862bc34aebc6f2ec25 (patch)
treef3a39b5c7df55cc8dab0552a6aeb0489d971f210 /src/backend/commands/tablecmds.c
parent0793ab810038999c0659b3aad9525aa7ef4c8c26 (diff)
downloadpostgresql-92fc6856cb4c598f99c58b862bc34aebc6f2ec25.tar.gz
postgresql-92fc6856cb4c598f99c58b862bc34aebc6f2ec25.zip
Respect changing pin limits in read_stream.c.
To avoid pinning too much of the buffer pool at once, read_stream.c previously used LimitAdditionalPins(). The coding was naive, and only considered the available buffers at stream construction time. This commit checks before each StartReadBuffers() call with GetAdditionalPinLimit(). The result might change over time due to pins acquired outside this stream by the same backend. No extra CPU cycles are added to the all-buffered fast-path code, but the I/O-starting path now considers the up-to-date remaining buffer limit. In practice it was quite difficult to exceed limits and cause any real problems in v17, so no back-patch for now, but proposed changes will make it easier. Per code review from Andres, in the course of testing his AIO patches. Reviewed-by: Andres Freund <andres@anarazel.de> (earlier versions) Discussion: https://postgr.es/m/CA%2BhUKGK_%3D4CVmMHvsHjOVrK6t4F%3DLBpFzsrr3R%2BaJYN8kcTfWg%40mail.gmail.com
Diffstat (limited to 'src/backend/commands/tablecmds.c')
0 files changed, 0 insertions, 0 deletions