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

From btkimurayuzk
Subject Add SQL function to show total block numbers in the relation
Date
Msg-id 00d0b21ebbd42f22e118fe9afa47713e@oss.nttdata.com
Whole thread Raw
Responses Re: Add SQL function to show total block numbers in the relation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello,


I propose new simple sql query, which shows total block numbers in the 
relation.

I now reviewing this patch (https://commitfest.postgresql.org/25/2211/) 
and I think,
it is usefull for knowing how many blocks there are in the relation to 
determine whether we use VACUUM RESUME or not.

Of cource, we can know this value such as

select (pg_relation_size('t') / 
current_setting('block_size')::bigint)::int;


but I think it is a litte bit complex.



Comment and feedback are very welcome.

Regards ,


Yu Kimura
Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: RFC: split OBJS lines to one object per line
Next
From: Dilip Kumar
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions