forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd4ffbf4
committed
RelationTruncate() must set DELAY_CHKPT_START.
Previously, it set only DELAY_CHKPT_COMPLETE. That was important,because it meant that if the XLOG_SMGR_TRUNCATE record preceded aXLOG_CHECKPOINT_ONLINE record in the WAL, then the truncation would alsohappen on disk before the XLOG_CHECKPOINT_ONLINE record waswritten.However, it didn't guarantee that the sync request for the truncationwas processed before the XLOG_CHECKPOINT_ONLINE record was written. Bysetting DELAY_CHKPT_START, we guarantee that if an XLOG_SMGR_TRUNCATErecord is written to WAL before the redo pointer of a concurrentcheckpoint, the sync request queued by that operation must be processedby that checkpoint, rather than being left for the following one.This is a refinement of commit412ad7a. Back-patch to all supportedreleases, like that commit.Author: Robert Haas <robertmhaas@gmail.com>Reported-by: Thomas Munro <thomas.munro@gmail.com>Discussion:https://postgr.es/m/CA%2BhUKG%2B-2rjGZC2kwqr2NMLBcEBp4uf59QT1advbWYF_uc%2B0Aw%40mail.gmail.com1 parenta963abd commitd4ffbf4
1 file changed
+20
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | | - | |
| 340 | + | |
| 341 | + | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
351 | 364 | | |
352 | | - | |
353 | | - | |
| 365 | + | |
| 366 | + | |
354 | 367 | | |
355 | 368 | | |
356 | 369 | | |
| |||
398 | 411 | | |
399 | 412 | | |
400 | 413 | | |
401 | | - | |
| 414 | + | |
402 | 415 | | |
403 | 416 | | |
404 | 417 | | |
| |||
0 commit comments
Comments
(0)