From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: xlog location arithmetic |
Date: | 2012-03-13 02:34:10 |
Message-ID: | CAHGQGwEfXLQy4HsVozbkQ6cVc3QYA5U6r+=fpT1o5HFFZPA8Vw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Mar 10, 2012 at 3:23 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Mar 9, 2012 at 12:38 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>> On Fri, Mar 9, 2012 at 18:18, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>>>> On Fri, Mar 9, 2012 at 15:37, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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?
Agreed. Attached patch introduces the overloaded funtion
pg_size_pretty(numeric).
>>> 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.
+1, too.
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
sizepretty_v3.patch | text/x-diff | 6.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2012-03-13 02:41:49 | Re: Measuring relation free space |
Previous Message | Robert Haas | 2012-03-13 02:26:34 | Re: wal_buffers, redux |