1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

New NameStr macro to convert Name to Str. No need for var.data anymore.

Fewer calls to nameout.

Better use of RelationGetRelationName.
This commit is contained in:
Bruce Momjian
1999-11-07 23:08:36 +00:00
parent df723a8a8a
commit 86ef36c907
65 changed files with 273 additions and 266 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.64 1999/09/28 11:41:06 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.65 1999/11/07 23:08:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -622,7 +622,7 @@ BufferAlloc(Relation reln,
}
/* record the database name and relation name for this buffer */
strcpy(buf->sb_relname, reln->rd_rel->relname.data);
strcpy(buf->sb_relname, RelationGetRelationName(reln));
strcpy(buf->sb_dbname, DatabaseName);
INIT_BUFFERTAG(&(buf->tag), reln, blockNum);
@ -1598,21 +1598,23 @@ FlushRelationBuffers(Relation rel, BlockNumber block, bool doFlush)
if (FlushBuffer(-i-1, false) != STATUS_OK)
{
elog(NOTICE, "FlushRelationBuffers(%s (local), %u): block %u is dirty, could not flush it",
rel->rd_rel->relname.data, block, buf->tag.blockNum);
RelationGetRelationName(rel),
block, buf->tag.blockNum);
return -1;
}
}
else
{
elog(NOTICE, "FlushRelationBuffers(%s (local), %u): block %u is dirty",
rel->rd_rel->relname.data, block, buf->tag.blockNum);
RelationGetRelationName(rel),
block, buf->tag.blockNum);
return -1;
}
}
if (LocalRefCount[i] > 0)
{
elog(NOTICE, "FlushRelationBuffers(%s (local), %u): block %u is referenced (%d)",
rel->rd_rel->relname.data, block,
RelationGetRelationName(rel), block,
buf->tag.blockNum, LocalRefCount[i]);
return -2;
}