forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5da7916
committed
Fix bugs in relpersistence handling during table creation.
Unlike the relistemp field which it replaced, relpersistence must beset correctly quite early during the table creation process, as werely on it quite early on for a number of purposes, including securitychecks. Normally, this is set based on whether the user enters CREATETABLE, CREATE UNLOGGED TABLE, or CREATE TEMPORARY TABLE, but arelation may also be made implicitly temporary by creating it inpg_temp. This patch fixes the handling of that case, and alsodisables creation of unlogged tables in temporary tablespace (suchtable indeed skip WAL-logging, but we reject an explicitspecification) and creation of relations in the temporary schemas ofother sessions (which is not very sensible, and didn't work rightanyway).Report by Amit Khandekar.1 parentacb9198 commit5da7916
File tree
8 files changed
+81
-39
lines changed- src
- backend
- catalog
- commands
- executor
- parser
- include/catalog
- test/regress/expected
8 files changed
+81
-39
lines changedLines changed: 44 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
311 | 311 |
| |
312 | 312 |
| |
313 | 313 |
| |
314 |
| - | |
315 |
| - | |
316 |
| - | |
317 |
| - | |
318 |
| - | |
319 |
| - | |
320 |
| - | |
321 |
| - | |
322 |
| - | |
323 |
| - | |
324 |
| - | |
325 |
| - | |
326 |
| - | |
327 | 314 |
| |
328 | 315 |
| |
329 | 316 |
| |
| |||
338 | 325 |
| |
339 | 326 |
| |
340 | 327 |
| |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
341 | 335 |
| |
342 | 336 |
| |
343 | 337 |
| |
| |||
389 | 383 |
| |
390 | 384 |
| |
391 | 385 |
| |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
392 | 423 |
| |
393 | 424 |
| |
394 | 425 |
| |
|
Lines changed: 7 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
431 | 431 |
| |
432 | 432 |
| |
433 | 433 |
| |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
434 | 441 |
| |
435 | 442 |
| |
436 | 443 |
| |
| |||
442 | 449 |
| |
443 | 450 |
| |
444 | 451 |
| |
445 |
| - | |
446 |
| - | |
447 |
| - | |
448 |
| - | |
449 |
| - | |
450 |
| - | |
451 | 452 |
| |
452 | 453 |
| |
453 | 454 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1610 | 1610 |
| |
1611 | 1611 |
| |
1612 | 1612 |
| |
| 1613 | + | |
1613 | 1614 |
| |
1614 | 1615 |
| |
1615 | 1616 |
| |
|
Lines changed: 15 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
100 |
| - | |
| 100 | + | |
| 101 | + | |
101 | 102 |
| |
102 |
| - | |
103 |
| - | |
| 103 | + | |
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
163 |
| - | |
164 | 163 |
| |
165 | 164 |
| |
166 | 165 |
| |
| |||
417 | 416 |
| |
418 | 417 |
| |
419 | 418 |
| |
| 419 | + | |
420 | 420 |
| |
421 | 421 |
| |
422 | 422 |
| |
| |||
480 | 480 |
| |
481 | 481 |
| |
482 | 482 |
| |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
483 | 489 |
| |
484 | 490 |
| |
485 | 491 |
| |
486 | 492 |
| |
487 | 493 |
| |
488 | 494 |
| |
489 |
| - | |
| 495 | + | |
490 | 496 |
| |
491 | 497 |
| |
492 | 498 |
| |
493 |
| - | |
494 | 499 |
| |
495 | 500 |
| |
496 | 501 |
| |
497 | 502 |
| |
498 | 503 |
| |
499 | 504 |
| |
500 |
| - | |
501 |
| - | |
502 |
| - | |
503 |
| - | |
504 |
| - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
505 | 508 |
| |
506 | 509 |
| |
507 | 510 |
| |
| |||
510 | 513 |
| |
511 | 514 |
| |
512 | 515 |
| |
513 |
| - | |
| 516 | + | |
514 | 517 |
| |
515 | 518 |
| |
516 | 519 |
| |
|
Lines changed: 7 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2413 | 2413 |
| |
2414 | 2414 |
| |
2415 | 2415 |
| |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
2416 | 2423 |
| |
2417 | 2424 |
| |
2418 | 2425 |
| |
| |||
2424 | 2431 |
| |
2425 | 2432 |
| |
2426 | 2433 |
| |
2427 |
| - | |
2428 |
| - | |
2429 |
| - | |
2430 |
| - | |
2431 |
| - | |
2432 |
| - | |
2433 | 2434 |
| |
2434 | 2435 |
| |
2435 | 2436 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
162 | 162 |
| |
163 | 163 |
| |
164 | 164 |
| |
| 165 | + | |
165 | 166 |
| |
166 | 167 |
| |
167 | 168 |
| |
| |||
374 | 375 |
| |
375 | 376 |
| |
376 | 377 |
| |
| 378 | + | |
377 | 379 |
| |
| 380 | + | |
| 381 | + | |
378 | 382 |
| |
379 | 383 |
| |
380 | 384 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| 53 | + | |
53 | 54 |
| |
54 | 55 |
| |
55 | 56 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
81 | 81 |
| |
82 | 82 |
| |
83 | 83 |
| |
84 |
| - | |
| 84 | + | |
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
88 |
| - | |
| 88 | + | |
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
|
0 commit comments
Comments
(0)