mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
The local buffer manager is no longer used for newly-created relations (unless they are TEMP); a new non-TEMP relation goes through the shared bufmgr and thus will participate normally in checkpoints. But TEMP relations use the local buffer manager throughout their lifespan. Also, operations in TEMP relations are not logged in WAL, thus improving performance. Since it's no longer necessary to fsync relations as they move out of the local buffers into shared buffers, quite a lot of smgr.c/md.c/fd.c code is no longer needed and has been removed: there's no concept of a dirty relation anymore in md.c/fd.c, and we never fsync anything but WAL. Still TODO: improve local buffer management algorithms so that it would be reasonable to increase NLocBuffer.
# $Header: /cvsroot/pgsql/src/backend/storage/smgr/README,v 1.1.1.1 1996/07/09 06:21:59 scrappy Exp $
This directory contains the code that supports the Postgres storage manager
switch and all of the installed storage managers. In released systems,
the only supported storage manager is the magnetic disk manager. At UC
Berkeley, the Sony WORM optical disk jukebox and persistent main memory are
also supported.
As of Postgres Release 3.0, every relation in the system is tagged with the
storage manager on which it resides. The storage manager switch code turns
what used to by filesystem operations into operations on the correct store,
for any given relation.
The files in this directory, and their contents, are
smgrtype.c Storage manager type -- maps string names to storage manager
IDs and provides simple comparison operators. This is the
regproc support for type 'smgr' in the system catalogs.
smgr.c The storage manager switch dispatch code. The routines in
this file call the appropriate storage manager to do hardware
accesses requested by the backend.
md.c The magnetic disk storage manager.
mm.c The persistent main memory storage manager (#undef'ed in
tmp/c.h for all distributed systems).
sj.c The sony jukebox storage manager and cache management code
(#undef'ed in tmp/c.h for all distributed systems). The
routines in this file allocate extents, maintain block
maps, and guarantee the persistence and coherency of a cache
of jukebox blocks on magnetic disk.
pgjb.c The postgres jukebox interface routines. The routines here
handle exclusion on the physical device and translate requests
from the storage manager code (sj.c) into jbaccess calls.
jbaccess.c Access code for the physical Sony jukebox device. This code
was swiped from Andy McFadden's jblib.a code at UC Berkeley.