|
1 | 1 | src/backend/storage/smgr/README
|
2 | 2 |
|
3 |
| -Storage Manager |
4 |
| -=============== |
| 3 | +Storage Managers |
| 4 | +================ |
5 | 5 |
|
6 | 6 | In the original Berkeley Postgres system, there were several storage managers,
|
7 | 7 | of which only the "magnetic disk" manager remains. (At Berkeley there were
|
8 | 8 | also managers for the Sony WORM optical disk jukebox and persistent main
|
9 | 9 | memory, but these were never supported in any externally released Postgres,
|
10 |
| -nor in any version of PostgreSQL.) However, we retain the notion of a storage |
11 |
| -manager switch in case anyone wants to reintroduce other kinds of storage |
12 |
| -managers. |
| 10 | +nor in any version of PostgreSQL.) The "magnetic disk" manager is itself |
| 11 | +seriously misnamed, because actually it supports any kind of device for |
| 12 | +which the operating system provides standard filesystem operations; which |
| 13 | +these days is pretty much everything of interest. However, we retain the |
| 14 | +notion of a storage manager switch in case anyone ever wants to reintroduce |
| 15 | +other kinds of storage managers. Removing the switch layer would save |
| 16 | +nothing noticeable anyway, since storage-access operations are surely far |
| 17 | +more expensive than one extra layer of C function calls. |
13 | 18 |
|
14 | 19 | In Berkeley Postgres each relation was tagged with the ID of the storage
|
15 |
| -manager to use for it. This is gone. It would be more reasonable to |
16 |
| -associate storage managers with tablespaces (a feature not present as this |
17 |
| -text is being written, but one likely to emerge soon). |
| 20 | +manager to use for it. This is gone. It would be probably more reasonable |
| 21 | +to associate storage managers with tablespaces, should we ever re-introduce |
| 22 | +multiple storage managers into the system catalogs. |
18 | 23 |
|
19 | 24 | The files in this directory, and their contents, are
|
20 | 25 |
|
| 26 | + smgr.c The storage manager switch dispatch code. The routines in |
| 27 | + this file call the appropriate storage manager to do storage |
| 28 | + accesses requested by higher-level code. smgr.c also manages |
| 29 | + the file handle cache (SMgrRelation table). |
| 30 | + |
| 31 | + md.c The "magnetic disk" storage manager, which is really just |
| 32 | + an interface to the kernel's filesystem operations. |
| 33 | + |
21 | 34 | smgrtype.c Storage manager type -- maps string names to storage manager
|
22 | 35 | IDs and provides simple comparison operators. This is the
|
23 |
| - regproc support for type 'smgr' in the system catalogs. |
| 36 | + regproc support for type "smgr" in the system catalogs. |
24 | 37 | (This is vestigial since no columns of type smgr exist
|
25 | 38 | in the catalogs anymore.)
|
26 | 39 |
|
27 |
| - smgr.c The storage manager switch dispatch code. The routines in |
28 |
| - this file call the appropriate storage manager to do hardware |
29 |
| - accesses requested by the backend. smgr.c also manages the |
30 |
| - file handle cache (SMgrRelation table). |
31 |
| - |
32 |
| - md.c The magnetic disk storage manager. |
33 |
| - |
34 | 40 | Note that md.c in turn relies on src/backend/storage/file/fd.c.
|
35 | 41 |
|
| 42 | + |
36 | 43 | Relation Forks
|
37 | 44 | ==============
|
38 | 45 |
|
|
0 commit comments