Re: Add SQL function to show total block numbers in the relation - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add SQL function to show total block numbers in the relation
Date
Msg-id 20191031032945.GD2530@paquier.xyz
Whole thread Raw
In response to Re: Add SQL function to show total block numbers in the relation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Oct 30, 2019 at 10:09:47AM -0400, Tom Lane wrote:
> btkimurayuzk <btkimurayuzk@oss.nttdata.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

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Allow cluster_name in log_line_prefix
Next
From: Tatsuo Ishii
Date:
Subject: Re: Allow cluster_name in log_line_prefix