Skip site navigation (1) Skip section navigation (2)

Re: Is mdextend really safe?

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is mdextend really safe?
Date: 2008-08-20 11:20:51
Message-ID: 48ABFE13.3010006@sun.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Gregory Stark napsal(a):


> On Unix that creates a sparse file where the intervening blocks are not
> allocated. When we later write out those blocks the filesystem then has to
> allocate space for them. IIRC the bug reports were from Windows. I'm not sure
> what NTFS's behaviour with sparse files is.

NTFS has sparse file feature, but how it works ...

> Now this only matters if we ever call mdextend on a block which isn't the
> block immediately following the end of file. Is that true?

I think, that it could happens only during wal log replay, but at the 
end everything should be OK. Look into ReadBuffer_common there is 
following code:

00226     /* Substitute proper block number if caller asked for P_NEW */
00227     if (isExtend)
00228         blockNum = smgrnblocks(smgr, forkNum);


		Zdenek



In response to

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2008-08-20 11:24:40
Subject: Re: Is mdextend really safe?
Previous:From: Florian WeimerDate: 2008-08-20 10:49:34
Subject: Re: Is mdextend really safe?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group