aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeSetOp.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-10-13 19:45:58 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-10-13 19:46:05 -0400
commit81e82a2bd48865f9a294b63d9492f9fde6a32787 (patch)
tree841f09a786aebaae2821b62edb5ae7fee6f915a4 /src/backend/executor/nodeSetOp.c
parentb1ee762a6138df073d4b2b80c235dd9025a8532c (diff)
downloadpostgresql-81e82a2bd48865f9a294b63d9492f9fde6a32787.tar.gz
postgresql-81e82a2bd48865f9a294b63d9492f9fde6a32787.zip
Fix handling of pgstat counters for TRUNCATE in a prepared transaction.
pgstat_twophase_postcommit is supposed to duplicate the math in AtEOXact_PgStat, but it had missed out the bit about clearing t_delta_live_tuples/t_delta_dead_tuples for a TRUNCATE. It's harder than you might think to replicate the issue here, because those counters would only be nonzero when a previous transaction in the same backend had added/deleted tuples in the truncated table, and those counts hadn't been sent to the stats collector yet. Evident oversight in commit d42358efb. I've not added a regression test for this; we tried to add one in d42358efb, and had to revert it because it was too timing-sensitive for the buildfarm. Back-patch to 9.5 where d42358efb came in. Stas Kelvich Discussion: <EB57BF68-C06D-4737-BDDC-4BA778F4E62B@postgrespro.ru>
Diffstat (limited to 'src/backend/executor/nodeSetOp.c')
0 files changed, 0 insertions, 0 deletions