forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1168acb
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 parente359cbb commit1168acb
1 file changed
+26
-10
lines changedLines changed: 26 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
326 | 326 |
| |
327 | 327 |
| |
328 | 328 |
| |
329 |
| - | |
330 |
| - | |
| 329 | + | |
| 330 | + | |
331 | 331 |
| |
332 |
| - | |
333 |
| - | |
334 |
| - | |
335 |
| - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
336 | 336 |
| |
337 |
| - | |
338 |
| - | |
339 |
| - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
340 | 353 |
| |
| 354 | + | |
| 355 | + | |
341 | 356 |
| |
342 |
| - | |
| 357 | + | |
343 | 358 |
| |
344 | 359 |
| |
345 | 360 |
| |
| |||
387 | 402 |
| |
388 | 403 |
| |
389 | 404 |
| |
| 405 | + | |
390 | 406 |
| |
391 | 407 |
| |
392 | 408 |
| |
|
0 commit comments
Comments
(0)