Re: Is mdextend really safe? - Mailing list pgsql-hackers

From Zdenek Kotala
Subject Re: Is mdextend really safe?
Date
Msg-id 48ABFE13.3010006@sun.com
Whole thread Raw
In response to Is mdextend really safe?  (Gregory Stark <stark@enterprisedb.com>)
List 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




pgsql-hackers by date:

Previous
From: Florian Weimer
Date:
Subject: Re: Is mdextend really safe?
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: Is mdextend really safe?