BufferAlloc() doesn't allocate write error buffers.
Remove compiler waring(my fault).
This commit is contained in:
parent
77df055c54
commit
5f18e2183e
1 changed files with 12 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.84 2000/09/29 01:23:47 inoue Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.85 2000/09/29 03:55:45 inoue Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -448,6 +448,16 @@ BufferAlloc(Relation reln,
|
||||||
{
|
{
|
||||||
bool smok;
|
bool smok;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* skip write error buffers
|
||||||
|
*/
|
||||||
|
if ((buf->flags & BM_IO_ERROR) != 0)
|
||||||
|
{
|
||||||
|
PrivateRefCount[BufferDescriptorGetBuffer(buf) - 1] = 0;
|
||||||
|
buf->refcount--;
|
||||||
|
buf = (BufferDesc *) NULL;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Set BM_IO_IN_PROGRESS to keep anyone from doing anything
|
* Set BM_IO_IN_PROGRESS to keep anyone from doing anything
|
||||||
* with the contents of the buffer while we write it out. We
|
* with the contents of the buffer while we write it out. We
|
||||||
|
@ -2529,7 +2539,7 @@ AbortBufferIO(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Assert((buf->flags & BM_DIRTY) != 0);
|
Assert((buf->flags & BM_DIRTY) != 0);
|
||||||
if (buf->flags & BM_IO_ERROR != 0)
|
if ((buf->flags & BM_IO_ERROR) != 0)
|
||||||
{
|
{
|
||||||
elog(NOTICE, "write error may be permanent: cannot write block %u for %s/%s",
|
elog(NOTICE, "write error may be permanent: cannot write block %u for %s/%s",
|
||||||
buf->tag.blockNum, buf->blind.dbname, buf->blind.relname);
|
buf->tag.blockNum, buf->blind.dbname, buf->blind.relname);
|
||||||
|
|
Loading…
Reference in a new issue