aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/reorderbuffer.c
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2020-07-13 08:06:05 +0530
committerAmit Kapila <akapila@postgresql.org>2020-07-13 08:53:23 +0530
commitd973747281caece520236e93d255c654cc613ec9 (patch)
tree5f80b648a1a3490b47bde42d0a06d9fbb84524eb /src/backend/replication/logical/reorderbuffer.c
parent5bfe6a3c485d3259f59fa2d2e1d34dea1a3baeba (diff)
downloadpostgresql-d973747281caece520236e93d255c654cc613ec9.tar.gz
postgresql-d973747281caece520236e93d255c654cc613ec9.zip
Revert "Track statistics for spilling of changes from ReorderBuffer".
The stats with this commit was available only for WALSenders, however, users might want to see for backends doing logical decoding via SQL API. Then, users might want to reset and access these stats across server restart which was not possible with the current patch. List of commits reverted: caa3c4242c Don't call elog() while holding spinlock. e641b2a995 Doc: Update the documentation for spilled transaction statistics. 5883f5fe27 Fix unportable printf format introduced in commit 9290ad198. 9290ad198b Track statistics for spilling of changes from ReorderBuffer. Additionaly, remove the release notes entry for this feature. Backpatch-through: 13, where it was introduced Discussion: https://postgr.es/m/CA+fd4k5_pPAYRTDrO2PbtTOe0eHQpBvuqmCr8ic39uTNmR49Eg@mail.gmail.com
Diffstat (limited to 'src/backend/replication/logical/reorderbuffer.c')
-rw-r--r--src/backend/replication/logical/reorderbuffer.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 7afa2271bd8..52519326690 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -317,10 +317,6 @@ ReorderBufferAllocate(void)
buffer->outbufsize = 0;
buffer->size = 0;
- buffer->spillCount = 0;
- buffer->spillTxns = 0;
- buffer->spillBytes = 0;
-
buffer->current_restart_decoding_lsn = InvalidXLogRecPtr;
dlist_init(&buffer->toplevel_by_lsn);
@@ -2418,7 +2414,6 @@ ReorderBufferSerializeTXN(ReorderBuffer *rb, ReorderBufferTXN *txn)
int fd = -1;
XLogSegNo curOpenSegNo = 0;
Size spilled = 0;
- Size size = txn->size;
elog(DEBUG2, "spill %u changes in XID %u to disk",
(uint32) txn->nentries_mem, txn->xid);
@@ -2477,13 +2472,6 @@ ReorderBufferSerializeTXN(ReorderBuffer *rb, ReorderBufferTXN *txn)
spilled++;
}
- /* update the statistics */
- rb->spillCount += 1;
- rb->spillBytes += size;
-
- /* Don't consider already serialized transactions. */
- rb->spillTxns += rbtxn_is_serialized(txn) ? 0 : 1;
-
Assert(spilled == txn->nentries_mem);
Assert(dlist_is_empty(&txn->changes));
txn->nentries_mem = 0;