- Notifications
You must be signed in to change notification settings - Fork28
Commitfd3a75d
committed
Free disk space for dropped relations on commit.
When committing a transaction that dropped a relation, we previouslytruncated only the first segment file to free up disk space (the onethat won't be unlinked until the next checkpoint).Truncate higher numbered segments too, even though we unlink them oncommit. This frees the disk space immediately, even if other backendshave open file descriptors and might take a long time to get around tohandling shared invalidation events and closing them. Also extend thesame behavior to the first segment, in recovery.Back-patch to all supported releases.Bug: #16663Reported-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.org1 parenta095e04 commitfd3a75d
1 file changed
+69
-31
lines changedLines changed: 69 additions & 31 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
286 | 286 |
| |
287 | 287 |
| |
288 | 288 |
| |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
289 | 324 |
| |
290 | 325 |
| |
291 | 326 |
| |
| |||
299 | 334 |
| |
300 | 335 |
| |
301 | 336 |
| |
302 |
| - | |
303 | 337 |
| |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
304 | 343 |
| |
| 344 | + | |
| 345 | + | |
| 346 | + | |
305 | 347 |
| |
306 |
| - | |
307 |
| - | |
308 |
| - | |
309 |
| - | |
310 |
| - | |
311 |
| - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
312 | 357 |
| |
313 | 358 |
| |
314 | 359 |
| |
315 |
| - | |
316 |
| - | |
317 |
| - | |
318 |
| - | |
319 |
| - | |
320 |
| - | |
321 |
| - | |
322 |
| - | |
323 |
| - | |
324 |
| - | |
325 |
| - | |
326 |
| - | |
327 |
| - | |
328 |
| - | |
329 |
| - | |
330 |
| - | |
331 |
| - | |
332 |
| - | |
333 |
| - | |
| 360 | + | |
| 361 | + | |
334 | 362 |
| |
335 | 363 |
| |
336 | 364 |
| |
| |||
350 | 378 |
| |
351 | 379 |
| |
352 | 380 |
| |
353 |
| - | |
354 |
| - | |
355 |
| - | |
356 |
| - | |
| 381 | + | |
| 382 | + | |
357 | 383 |
| |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
358 | 396 |
| |
| 397 | + | |
359 | 398 |
| |
360 |
| - | |
361 | 399 |
| |
362 | 400 |
| |
363 | 401 |
| |
|
0 commit comments
Comments
(0)