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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-08-20 11:24:40 Re: Is mdextend really safe?
Previous Message Florian Weimer 2008-08-20 10:49:34 Re: Is mdextend really safe?