forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1d584f9
committed
Clean up various to-do items associated with system indexes:
pg_database now has unique indexes on oid and on datname.pg_shadow now has unique indexes on usename and on usesysid.pg_am now has unique index on oid.pg_opclass now has unique index on oid.pg_amproc now has unique index on amid+amopclaid+amprocnum.Remove pg_rewrite's unnecessary index on oid, delete unused RULEOID syscache.Remove index on pg_listener and associated syscache for performance reasons(caching rows that are certain to change before you need 'em again israther pointless).Change pg_attrdef's nonunique index on adrelid into a unique index onadrelid+adnum.Fix various incorrect settings of pg_class.relisshared, make that theprimary reference point for whether a relation is shared or not.IsSharedSystemRelationName() is now only consulted to initialize relissharedduring initial creation of tables and indexes. In theory we might nowsupport shared user relations, though it's not clear how one would getentries for them into pg_class &etc of multiple databases.Fix recently reported bug that pg_attribute rows created for an index all havethe same OID. (Proof that non-unique OID doesn't matter unless it'sactually used to do lookups ;-))There's no need to treat pg_trigger, pg_attrdef, pg_relcheck as bootstraprelations. Convert them into plain system catalogs without hardwiredentries in pg_class and friends.Unify global.bki and template1.bki into a single init script postgres.bki,since the alleged distinction between them was misleading and pointless.Not to mention that it didn't work for setting up indexes on sharedsystem relations.Rationalize locking of pg_shadow, pg_group, pg_attrdef (no need to useAccessExclusiveLock where ExclusiveLock or even RowExclusiveLock will do).Also, hold locks until transaction commit where necessary.1 parentd2c8358 commit1d584f9
File tree
30 files changed
+470
-646
lines changed- doc/src/sgml
- src
- backend
- access/common
- catalog
- commands
- storage/lmgr
- utils
- cache
- init
- bin/initdb
- include
- access
- catalog
- utils
- test/regress/expected
30 files changed
+470
-646
lines changedLines changed: 11 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
2 | 4 |
| |
3 | 5 |
| |
4 | 6 |
| |
| |||
15 | 17 |
| |
16 | 18 |
| |
17 | 19 |
| |
18 |
| - | |
| 20 | + | |
19 | 21 |
| |
20 |
| - | |
| 22 | + | |
21 | 23 |
| |
22 | 24 |
| |
23 | 25 |
| |
24 |
| - | |
25 |
| - | |
26 |
| - | |
27 |
| - | |
| 26 | + | |
| 27 | + | |
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
| 42 | + | |
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
52 |
| - | |
| 52 | + | |
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
| |||
155 | 155 |
| |
156 | 156 |
| |
157 | 157 |
| |
158 |
| - | |
| 158 | + | |
159 | 159 |
| |
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
164 |
| - | |
| 164 | + | |
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| |||
645 | 645 |
| |
646 | 646 |
| |
647 | 647 |
| |
648 |
| - | |
| 648 | + | |
| 649 | + | |
649 | 650 |
| |
650 | 651 |
| |
651 | 652 |
| |
|
Lines changed: 21 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
738 | 738 |
| |
739 | 739 |
| |
740 | 740 |
| |
741 |
| - | |
742 |
| - | |
743 |
| - | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
744 | 749 |
| |
745 |
| - | |
746 | 750 |
| |
747 |
| - | |
748 |
| - | |
749 |
| - | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
750 | 754 |
| |
751 | 755 |
| |
752 |
| - | |
753 |
| - | |
| 756 | + | |
| 757 | + | |
754 | 758 |
| |
755 | 759 |
| |
756 | 760 |
| |
757 | 761 |
| |
758 |
| - | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
759 | 765 |
| |
760 |
| - | |
761 |
| - | |
762 | 766 |
| |
763 |
| - | |
764 |
| - | |
765 | 767 |
| |
766 | 768 |
| |
767 | 769 |
| |
768 | 770 |
| |
| 771 | + | |
| 772 | + | |
769 | 773 |
| |
770 | 774 |
| |
771 | 775 |
| |
772 | 776 |
| |
773 | 777 |
| |
774 |
| - | |
775 |
| - | |
| 778 | + | |
776 | 779 |
| |
777 |
| - | |
778 |
| - | |
| 780 | + | |
779 | 781 |
| |
780 | 782 |
| |
781 | 783 |
|
Lines changed: 14 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 |
| - | |
| 5 | + | |
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 |
| |
25 |
| - | |
26 |
| - | |
27 |
| - | |
28 |
| - | |
29 |
| - | |
| 28 | + | |
30 | 29 |
| |
31 |
| - | |
| 30 | + | |
32 | 31 |
| |
33 |
| - | |
34 |
| - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
39 |
| - | |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
| 39 | + | |
44 | 40 |
| |
45 |
| - | |
| 41 | + | |
46 | 42 |
| |
47 | 43 |
| |
48 | 44 |
| |
49 |
| - | |
50 |
| - | |
51 |
| - | |
52 |
| - | |
| 45 | + | |
| 46 | + | |
53 | 47 |
| |
54 | 48 |
| |
55 | 49 |
| |
|
Lines changed: 17 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
218 | 218 |
| |
219 | 219 |
| |
220 | 220 |
| |
221 |
| - | |
222 |
| - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
223 | 224 |
| |
224 | 225 |
| |
225 | 226 |
| |
| |||
263 | 264 |
| |
264 | 265 |
| |
265 | 266 |
| |
266 |
| - | |
267 |
| - | |
268 |
| - | |
269 |
| - | |
270 |
| - | |
271 |
| - | |
272 | 267 |
| |
273 | 268 |
| |
274 | 269 |
| |
| |||
566 | 561 |
| |
567 | 562 |
| |
568 | 563 |
| |
569 |
| - | |
| 564 | + | |
570 | 565 |
| |
571 | 566 |
| |
572 | 567 |
| |
| |||
583 | 578 |
| |
584 | 579 |
| |
585 | 580 |
| |
586 |
| - | |
587 |
| - | |
588 |
| - | |
589 |
| - | |
590 |
| - | |
591 |
| - | |
| 581 | + | |
592 | 582 |
| |
593 | 583 |
| |
594 | 584 |
| |
595 |
| - | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
596 | 593 |
| |
597 | 594 |
| |
598 | 595 |
| |
| |||
603 | 600 |
| |
604 | 601 |
| |
605 | 602 |
| |
606 |
| - | |
607 |
| - | |
608 | 603 |
| |
609 | 604 |
| |
610 | 605 |
| |
611 | 606 |
| |
612 | 607 |
| |
| 608 | + | |
| 609 | + | |
613 | 610 |
| |
614 | 611 |
| |
615 | 612 |
| |
| |||
686 | 683 |
| |
687 | 684 |
| |
688 | 685 |
| |
689 |
| - | |
| 686 | + | |
690 | 687 |
| |
691 | 688 |
| |
692 | 689 |
| |
|
0 commit comments
Comments
(0)