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-01-31 15:47:12
Message-ID: CAM-w4HOO3m3My_tDkUNj1dB9jj3LYuOFTEjFPGzLuYWLLpxZwg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 31, 2014 at 3:41 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 400 * 400 * 400 / 2000 * 54 + 1F0C0000 / 2000
>> 11073632

Ooops, it's reading 54 in hex there.
> # select ((2^30) * 54.0 + 'x1F0C0000'::bit(32)::int) / 8192;
> ?column?
> ----------
> 7141472

ibase=16
400 * 400 * 400 / 2000 * 36 + 1F0C0000 / 2000
7141472.00000000000000000000

So now that I've got the arithmetic right:

=# select (page_header(get_raw_page('index_data_id', 'main', 7141472))).* ;
lsn | tli | flags | lower | upper | special | pagesize |
version | prune_xid
------------+-----+-------+-------+-------+---------+----------+---------+-----------
EA1/638988 | 6 | 0 | 1240 | 3312 | 8176 | 8192 |
4 | 0

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-01-31 15:56:43 Re: Recovery inconsistencies, standby much larger than primary
Previous Message Robert Haas 2014-01-31 15:47:09 Re: Add force option to dropdb