1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Restructure smgr API as per recent proposal. smgr no longer depends on

the relcache, and so the notion of 'blind write' is gone.  This should
improve efficiency in bgwriter and background checkpoint processes.
Internal restructuring in md.c to remove the not-very-useful array of
MdfdVec objects --- might as well just use pointers.
Also remove the long-dead 'persistent main memory' storage manager (mm.c),
since it seems quite unlikely to ever get resurrected.
This commit is contained in:
Tom Lane
2004-02-10 01:55:27 +00:00
parent f06e79525a
commit 87bd956385
37 changed files with 933 additions and 1776 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.72 2004/01/06 18:07:32 neilc Exp $
* $PostgreSQL: pgsql/src/include/utils/rel.h,v 1.73 2004/02/10 01:55:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,7 +20,6 @@
#include "catalog/pg_index.h"
#include "rewrite/prs2lock.h"
#include "storage/block.h"
#include "storage/fd.h"
#include "storage/relfilenode.h"
@@ -98,16 +97,16 @@ typedef struct PgStat_Info
bool index_scan_counted;
} PgStat_Info;
/*
* Here are the contents of a relation cache entry.
*/
typedef struct RelationData
{
File rd_fd; /* open file descriptor, or -1 if
* none; this is NOT an operating
* system file descriptor */
RelFileNode rd_node; /* file node (physical identifier) */
RelFileNode rd_node; /* relation physical identifier */
/* use "struct" here to avoid needing to include smgr.h: */
struct SMgrRelationData *rd_smgr; /* cached file handle, or NULL */
BlockNumber rd_nblocks; /* number of blocks in rel */
BlockNumber rd_targblock; /* current insertion target block, or
* InvalidBlockNumber */
@@ -226,14 +225,6 @@ typedef Relation *RelationPtr;
*/
#define RelationGetRelid(relation) ((relation)->rd_id)
/*
* RelationGetFile
* Returns the open file descriptor for the rel, or -1 if
* none. This is NOT an operating system file descriptor; see md.c
* for more information
*/
#define RelationGetFile(relation) ((relation)->rd_fd)
/*
* RelationGetNumberOfAttributes
* Returns the number of attributes in a relation.