Re: xlog location arithmetic - Mailing list pgsql-hackers

From Robert Haas
Subject Re: xlog location arithmetic
Date
Msg-id CA+Tgmob_40LTXN-zpKJan6eEvL+3dT_rX_U2WxY_nAQN3_7W9A@mail.gmail.com
Whole thread Raw
In response to Re: xlog location arithmetic  (Magnus Hagander <magnus@hagander.net>)
Responses Re: xlog location arithmetic  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On Fri, Mar 9, 2012 at 12:38 PM, Magnus Hagander <magnus@hagander.net> wrote:
> On Fri, Mar 9, 2012 at 18:18, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Magnus Hagander <magnus@hagander.net> writes:
>>> On Fri, Mar 9, 2012 at 15:37, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> Why would it be useful to use pg_size_pretty on xlog locations?
>>>> -1 because of the large expense of bigint->numeric->whatever conversion
>>>> that would be added to existing uses.
>>
>>> Given the expense, perhaps we need to different (overloaded) functions instead?
>>
>> That would be a workable solution, but I continue to not believe that
>> this is useful enough to be worth the trouble.
>
> There's certainly some use to being able to prettify it. Wouldn't a
> pg_size_pretty(numeric) also be useful if you want to pg_size_() a
> sum() of something? Used on files it doesn't make too much sense,
> given how big those files have to be, but it can be used on other
> things as well...
>
> I can see a usecase for having a pg_size_pretty(numeric) as an option.
> Not necessarily a very big one, but a >0 one.

+1.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: check function patch
Next
From: Robert Haas
Date:
Subject: Re: elegant and effective way for running jobs inside a database