Re: Add SQL function to show total block numbers in the relation

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: btkimurayuzk <btkimurayuzk(at)oss(dot)nttdata(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add SQL function to show total block numbers in the relation
Date: 2019-10-31 03:29:45
Message-ID: 20191031032945.GD2530@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 30, 2019 at 10:09:47AM -0400, Tom Lane wrote:
> btkimurayuzk <btkimurayuzk(at)oss(dot)nttdata(dot)com> writes:
>> I propose new simple sql query, which shows total block numbers in the
>> relation.
>> ...
>> Of cource, we can know this value such as
>> select (pg_relation_size('t') /
>> current_setting('block_size')::bigint)::int;
>
> I don't really see why the existing solution isn't sufficient.

+1.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2019-10-31 04:41:02 Re: Allow cluster_name in log_line_prefix
Previous Message Thomas Munro 2019-10-31 02:54:17 Re: Allow cluster_name in log_line_prefix