- Notifications
You must be signed in to change notification settings - Fork28
Commit04011cc
committed
Allow backends to start up without use of the flat-file copy of pg_database.
To make this work in the base case, pg_database now has a nailed-in-cacherelation descriptor that is initialized using hardwired knowledge inrelcache.c. This means pg_database is added to the set of relations thatneed to have a Schema_pg_xxx macro maintained in pg_attribute.h. When thispath is taken, we'll have to do a seqscan of pg_database to find the rowwe need.In the normal case, we are able to do an indexscan to find the database's rowby name. This is made possible by storing a global relcache init file thatdescribes only the shared catalogs and their indexes (and therefore is usableby all backends in any database). A new backend loads this cache file,finds its database OID after an indexscan on pg_database, and then loadsthe local relcache init file for that database.This change should effectively eliminate number of databases as a factorin backend startup time, even with large numbers of databases. However,the real reason for doing it is as a first step towards getting rid ofthe flat files altogether. There are still several other sub-projectsto be tackled before that can happen.1 parenta1f0c9b commit04011cc
File tree
13 files changed
+606
-354
lines changed- src
- backend
- access/transam
- postmaster
- storage/lmgr
- utils
- cache
- init
- include
- catalog
- storage
- utils
13 files changed
+606
-354
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
5249 | 5249 | | |
5250 | 5250 | | |
5251 | 5251 | | |
| 5252 | + | |
| 5253 | + | |
| 5254 | + | |
| 5255 | + | |
| 5256 | + | |
| 5257 | + | |
| 5258 | + | |
| 5259 | + | |
| 5260 | + | |
| 5261 | + | |
5252 | 5262 | | |
5253 | 5263 | | |
5254 | 5264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
1602 | 1602 | | |
1603 | 1603 | | |
1604 | 1604 | | |
1605 | | - | |
| 1605 | + | |
1606 | 1606 | | |
1607 | 1607 | | |
1608 | 1608 | | |
| |||
1620 | 1620 | | |
1621 | 1621 | | |
1622 | 1622 | | |
1623 | | - | |
| 1623 | + | |
1624 | 1624 | | |
1625 | 1625 | | |
1626 | 1626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
2138 | 2138 | | |
2139 | 2139 | | |
2140 | 2140 | | |
| 2141 | + | |
2141 | 2142 | | |
2142 | 2143 | | |
2143 | 2144 | | |
| |||
2232 | 2233 | | |
2233 | 2234 | | |
2234 | 2235 | | |
2235 | | - | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
2236 | 2244 | | |
2237 | 2245 | | |
2238 | 2246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
| 335 | + | |
| 336 | + | |
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | 343 | | |
352 | 344 | | |
353 | 345 | | |
| |||
0 commit comments
Comments
(0)