Re: Recovery inconsistencies, standby much larger than primary

From: Greg Stark <stark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Recovery inconsistencies, standby much larger than primary
Date: 2014-02-01 09:36:25
Message-ID: CAM-w4HMYaRsLPcsPhGOjz01U+SUthM=OAFKuxawdfaBVoeNdag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 31, 2014 at 8:21 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2014-02-01 10:02:22 Re: Recovery inconsistencies, standby much larger than primary
Previous Message Peter Geoghegan 2014-02-01 08:51:49 Re: Wait free LW_SHARED acquisition - v0.2