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

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_class.relpages/allvisible probably shouldn't be a int4
Date: 2014-05-09 17:29:03
Message-ID: 20140509172903.GJ30231@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

postgres=# SELECT relpages FROM pg_class WHERE relname = 'large';
relpages
-------------
-1804468224
(1 row)

postgres=# \dt+ large
List of relations
Schema | Name | Type | Owner | Size | Description
--------+-------+-------+--------+-------+-------------
public | large | table | andres | 19 TB |
(1 row)

That's nothing for 9.4 anymore, but shouldn't we make pg_class.relpages
a int8 (sounds slightly better than float to me) or somesuch?

I think most calculations actually work out because they're performed
after casting to BlockNumber, but ...

Greetings,

Andres Freund

PS: _mdfd_getseg is considered harmful(). Not fun once you have couple
of hundred gigabytes.

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-05-09 18:01:23 Re: How can we make beta testing better?
Previous Message Alexander Korotkov 2014-05-09 17:27:34 Re: [COMMITTERS] pgsql: Clean up jsonb code.