On Fri, Jan 31, 2014 at 8:21 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
>  So on a filesystem that supports "holes"
> in files, I'd expect that the added segments would be fully allocated
> if XLogReadBufferExtended did the deed, but they'd be quite small if
> _mdfd_getseg did so.  The du results you started with suggest that the
> former is the case, but could you verify that the filesystem this is
> on supports holes and that du will report only the actually allocated
> space when there's a hole?

Yup, it's xfs:

# dd if=/dev/zero seek=1M count=1 bs=1kB of=hole
1+0 records in
1+0 records out
1000 bytes (1.0 kB) copied, 5.7286e-05 s, 17.5 MB/s

# ls -ls hole
4 -rw-r--r-- 1 root root 1048577000 Feb  1 09:35 hole

# ls -ls 1261982.5*
1048576 -rw------- 1 ua8157t9mbut8r postgres 1073741824 Jan 14 12:51 1261982.5
1048576 -rw------- 1 ua8157t9mbut8r postgres 1073741824 Jan 23 02:05 1261982.50
1048576 -rw------- 1 ua8157t9mbut8r postgres 1073741824 Jan 23 02:07 1261982.51
1048576 -rw------- 1 ua8157t9mbut8r postgres 1073741824 Jan 23 02:09 1261982.52
1048576 -rw------- 1 ua8157t9mbut8r postgres 1073741824 Jan 23 02:10 1261982.53
 508680 -rw------- 1 ua8157t9mbut8r postgres  520888320 Jan 23 02:12 1261982.54



-- 
greg


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to