forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitee937f0
committed
Fix data loss when restarting the bulk_write facility
If a user started a bulk write operation on a fork with existing datato append data in bulk, the bulk_write machinery would zero out allpreviously written pages up to the last page written by the newbulk_write operation.This is not an issue for PostgreSQL itself, because we never use thebulk_write facility on a non-empty fork. But there are use cases whereit makes sense. TimescaleDB extension is known to do that to mergepartitions, for example.Backpatch to v17, where the bulk_write machinery was introduced.Author: Matthias van de Meent <boekewurm+postgres@gmail.com>Reported-By: Erik Nordström <erik@timescale.com>Reviewed-by: Erik Nordström <erik@timescale.com>Discussion:https://www.postgresql.org/message-id/CACAa4VJ%2BQY4pY7M0ECq29uGkrOygikYtao1UG9yCDFosxaps9g@mail.gmail.com1 parentaac831c commitee937f0
1 file changed
+11
-8
lines changedLines changed: 11 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
8 |
| - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
9 | 11 |
| |
10 | 12 |
| |
11 | 13 |
| |
| |||
68 | 70 |
| |
69 | 71 |
| |
70 | 72 |
| |
71 |
| - | |
| 73 | + | |
72 | 74 |
| |
73 | 75 |
| |
74 | 76 |
| |
| |||
105 | 107 |
| |
106 | 108 |
| |
107 | 109 |
| |
108 |
| - | |
| 110 | + | |
109 | 111 |
| |
110 | 112 |
| |
111 | 113 |
| |
| |||
279 | 281 |
| |
280 | 282 |
| |
281 | 283 |
| |
282 |
| - | |
| 284 | + | |
283 | 285 |
| |
284 | 286 |
| |
285 | 287 |
| |
| |||
288 | 290 |
| |
289 | 291 |
| |
290 | 292 |
| |
291 |
| - | |
| 293 | + | |
292 | 294 |
| |
293 | 295 |
| |
294 | 296 |
| |
295 |
| - | |
| 297 | + | |
296 | 298 |
| |
297 | 299 |
| |
| 300 | + | |
298 | 301 |
| |
299 | 302 |
| |
300 | 303 |
| |
301 |
| - | |
| 304 | + | |
302 | 305 |
| |
303 | 306 |
| |
304 | 307 |
| |
|
0 commit comments
Comments
(0)