summaryrefslogtreecommitdiff
path: root/contrib/btree_gist
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2020-12-01 13:21:03 +1300
committerThomas Munro <tmunro@postgresql.org>2020-12-01 13:37:00 +1300
commit50f338574242be955c79ed0b3e193ce3ff4cd5eb (patch)
tree6d6619d3f1570aac4dd7c1b67d67309a0687b0e2 /contrib/btree_gist
parentb2603f16ad7531a5e09b1f38a0b4382a946a139f (diff)
Free disk space for dropped relations on commit.
When committing a transaction that dropped a relation, we previously truncated only the first segment file to free up disk space (the one that won't be unlinked until the next checkpoint). Truncate higher numbered segments too, even though we unlink them on commit. This frees the disk space immediately, even if other backends have open file descriptors and might take a long time to get around to handling shared invalidation events and closing them. Also extend the same behavior to the first segment, in recovery. Back-patch to all supported releases. Bug: #16663 Reported-by: Denis Patron <denis.patron@previnet.it> Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com> Reviewed-by: Neil Chen <carpenter.nail.cz@gmail.com> Reviewed-by: David Zhang <david.zhang@highgo.ca> Discussion: https://postgr.es/m/16663-fe97ccf9932fc800%40postgresql.org
Diffstat (limited to 'contrib/btree_gist')
0 files changed, 0 insertions, 0 deletions