Re: pg_class.relpages/allvisible probably shouldn't be a int4

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_class.relpages/allvisible probably shouldn't be a int4
Date: 2014-05-12 07:15:02
Message-ID: 20140512071502.GC9586@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-05-12 10:07:29 +0300, Heikki Linnakangas wrote:
> On 05/12/2014 12:30 AM, Andres Freund wrote:
> >>>So if I were to take Andres'
> >>>complaint seriously at all, I'd be thinking in terms of "do we need to
> >>>widen BlockNumber to int64?", not "how do we make this print as
> >>>unsigned?". But I doubt such a proposal would fly, because of the
> >>>negative impact on index sizes.
> >Yea, I am not wild for that either. I guess migrating to a postgres with
> >a larger blocksize is the next step.
>
> A larger block size won't buy you very much time either.

Well. If you mean 'a year or five with that... :)

> We could steal some bits from the OffsetNumber portion of an ItemPointer. If
> we assume the max. block size of 32kb, and that each Item takes at least 16
> bytes, you only need 11 bits for the offset number. That leaves 5 bits
> unused, and if we use them to expand the block number to 37 bits in total,
> that's enough for 1 PB with the default 8k block size.

Hm. That's not a generally bad idea. I think we'll have to do that in a
couple of years. Regardless of better partitioning.

> But I concur that in practice, if you're dealing with 16TB tables, it's time
> to partition.

Well, we need to improve our partitioning for that to be viable for all
relations. Not having usable foreign and unique keys makes it a pita in
some cases.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-05-12 07:30:02 Re: [COMMITTERS] pgsql: Clean up jsonb code.
Previous Message Heikki Linnakangas 2014-05-12 07:07:29 Re: pg_class.relpages/allvisible probably shouldn't be a int4