pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Change LogicalTapeSetBlocks() to use nBlocksWritten.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Change LogicalTapeSetBlocks() to use nBlocksWritten.
@ 2020-09-16 04:47 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Jeff Davis @ 2020-09-16 04:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Change LogicalTapeSetBlocks() to use nBlocksWritten.

Previously, it was based on nBlocksAllocated to account for tapes with
open write buffers that may not have made it to the BufFile yet.

That was unnecessary, because callers do not need to get the number of
blocks while a tape has an open write buffer; and it also conflicted
with the preallocation logic added for HashAgg.

Reviewed-by: Peter Geoghegan
Discussion: https://postgr.es/m/ce5af05900fdbd0e9185747825a7423c48501964.camel@j-davis.com
Backpatch-through: 13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c8aeaf3ab31edeedf1791e37c74bcedf61a916ed

Modified Files
--------------
src/backend/executor/nodeAgg.c   |  2 +-
src/backend/utils/sort/logtape.c | 12 +++++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Change LogicalTapeSetBlocks() to use nBlocksWritten.
@ 2020-09-16 04:51 Jeff Davis <jdavis@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Jeff Davis @ 2020-09-16 04:51 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Change LogicalTapeSetBlocks() to use nBlocksWritten.

Previously, it was based on nBlocksAllocated to account for tapes with
open write buffers that may not have made it to the BufFile yet.

That was unnecessary, because callers do not need to get the number of
blocks while a tape has an open write buffer; and it also conflicted
with the preallocation logic added for HashAgg.

Reviewed-by: Peter Geoghegan
Discussion: https://postgr.es/m/ce5af05900fdbd0e9185747825a7423c48501964.camel@j-davis.com
Backpatch-through: 13

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6e146a663536f86c8421ac6ed08c4eb9a69979fd

Modified Files
--------------
src/backend/executor/nodeAgg.c   |  2 +-
src/backend/utils/sort/logtape.c | 12 +++++++++++-
2 files changed, 12 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-09-16 04:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 04:47 pgsql: Change LogicalTapeSetBlocks() to use nBlocksWritten. Jeff Davis <jdavis@postgresql.org>
2020-09-16 04:51 pgsql: Change LogicalTapeSetBlocks() to use nBlocksWritten. Jeff Davis <jdavis@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox