summaryrefslogtreecommitdiff
path: root/src/tutorial/syscat.source
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2018-12-27 16:17:40 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2018-12-27 16:17:40 -0300
commit2602838fa33824a0803f3b1f3814889ac7e93192 (patch)
tree174e2b5b2c4f63899021b922c076b5b583b2d381 /src/tutorial/syscat.source
parent5199abaca318f0571aa3df09f5b700335d7d62d1 (diff)
Have DISCARD ALL/TEMP remove leftover temp tables
Previously, it would only remove temp tables created in the same session; but if the session uses the BackendId of a previously crashed backend that left temp tables around, those would not get removed. Since autovacuum would not drop them either (because it sees that the BackendId is in use by the current session) these can cause annoying xid-wraparound warnings. Apply to branches 9.4 to 10. This is not a problem since version 11, because commit 943576bddcb5 added state tracking that makes autovacuum realize that those temp tables are not ours, so it removes them. This is useful to handle in DISCARD, because even though it does not handle all situations, it does handle the common one where a connection pooler keeps the same session open for an indefinitely long time. Discussion: https://postgr.es/m/20181226190834.wsk2wzott5yzrjiq@alvherre.pgsql Reviewed-by: Takayuki Tsunakawa, Michaƫl Paquier
Diffstat (limited to 'src/tutorial/syscat.source')
0 files changed, 0 insertions, 0 deletions