forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit15f6927
committed
Disable WAL-skipping optimization for COPY on views
COPY can skip writing WAL when loading data on a table which has beencreated in the same transaction as the one loading the data, howeverthis cannot work on views as this would result in trying to flushrelation files which do not exist. So disable the optimization so ascommands are able to work the same way with any configuration ofwal_level.A test is added to cover this case, which needs to have wal_level set tominimal to allow the problem to show up, and that is not the defaultconfiguration.Reported-by: Etsuro FujitaAuthor: Michael PaquierReviewed-by: Etsuro FujitaDiscussion:https://postgr.es/m/15552-c64aa14c5c22f63c@postgresql.orgBackpatch-through: 10, where support for COPY on views has been added,while v11 has added support for COPY on foreign tables.1 parent669d9ea commit15f6927
3 files changed
+39
-0
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2408 | 2408 |
| |
2409 | 2409 |
| |
2410 | 2410 |
| |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
2411 | 2415 |
| |
2412 | 2416 |
| |
2413 | 2417 |
| |
2414 | 2418 |
| |
| 2419 | + | |
2415 | 2420 |
| |
2416 | 2421 |
| |
2417 | 2422 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
557 | 557 |
| |
558 | 558 |
| |
559 | 559 |
| |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
560 | 577 |
| |
561 | 578 |
| |
562 | 579 |
| |
| |||
569 | 586 |
| |
570 | 587 |
| |
571 | 588 |
| |
| 589 | + | |
572 | 590 |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
411 | 411 |
| |
412 | 412 |
| |
413 | 413 |
| |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
414 | 429 |
| |
415 | 430 |
| |
416 | 431 |
| |
| |||
424 | 439 |
| |
425 | 440 |
| |
426 | 441 |
| |
| 442 | + | |
427 | 443 |
|
0 commit comments
Comments
(0)