forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit81e82a2
committed
Fix handling of pgstat counters for TRUNCATE in a prepared transaction.
pgstat_twophase_postcommit is supposed to duplicate the math inAtEOXact_PgStat, but it had missed out the bit about clearingt_delta_live_tuples/t_delta_dead_tuples for a TRUNCATE.It's harder than you might think to replicate the issue here, becausethose counters would only be nonzero when a previous transaction inthe 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 commitd42358e. I've not added a regressiontest for this; we tried to add one ind42358e, and had to revert itbecause it was too timing-sensitive for the buildfarm.Back-patch to 9.5 whered42358e came in.Stas KelvichDiscussion: <EB57BF68-C06D-4737-BDDC-4BA778F4E62B@postgrespro.ru>1 parentb1ee762 commit81e82a2
1 file changed
+6
-1
lines changedLines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2226 | 2226 |
| |
2227 | 2227 |
| |
2228 | 2228 |
| |
2229 |
| - | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
2230 | 2235 |
| |
2231 | 2236 |
| |
2232 | 2237 |
| |
|
0 commit comments
Comments
(0)