postgresql/src/backend/storage/smgr
Tom Lane 23645f0582 Fix incorrect ordering of smgr cleanup relative to buffer pin cleanup
during transaction abort.  Add a regression test case to catch related
mistakes in future.  Alvaro Herrera and Tom Lane.
2004-09-06 17:56:33 +00:00
..
Makefile Restructure smgr API as per recent proposal. smgr no longer depends on 2004-02-10 01:55:27 +00:00
README Restructure smgr API as per recent proposal. smgr no longer depends on 2004-02-10 01:55:27 +00:00
md.c Tweak md.c logic to cope with the situation where WAL replay tries to 2004-08-30 03:52:43 +00:00
smgr.c Fix incorrect ordering of smgr cleanup relative to buffer pin cleanup 2004-09-06 17:56:33 +00:00
smgrtype.c Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00

README

# $PostgreSQL: pgsql/src/backend/storage/smgr/README,v 1.3 2004/02/10 01:55:26 tgl Exp $

In the original Berkeley Postgres system, there were several storage managers,
of which only the "magnetic disk" manager remains.  (At Berkeley there were
also managers for the Sony WORM optical disk jukebox and persistent main
memory, but these were never supported in any externally released Postgres,
nor in any version of PostgreSQL.)  However, we retain the notion of a storage
manager switch in case anyone wants to reintroduce other kinds of storage
managers.

In Berkeley Postgres each relation was tagged with the ID of the storage
manager to use for it.  This is gone.  It would be more reasonable to
associate storage managers with tablespaces (a feature not present as this
text is being written, but one likely to emerge soon).

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.
		(This is vestigial since no columns of type smgr exist
		in the catalogs anymore.)

    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.  smgr.c also manages the
		file handle cache (SMgrRelation table).

    md.c	The magnetic disk storage manager.

Note that md.c in turn relies on src/backend/storage/file/fd.c.