Re: XLByte* usage

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: XLByte* usage
Дата
Msg-id 27767.1355766461@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: XLByte* usage  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: XLByte* usage
Re: XLByte* usage
Список pgsql-hackers
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> On 17.12.2012 11:04, Pavan Deolasee wrote:
>> On Mon, Dec 17, 2012 at 2:00 PM, Heikki Linnakangas
>> <hlinnakangas@vmware.com>  wrote:
>>> I've still used XLByte* macros, but I agree that plain <=> are easier to
>>> read. +1 for using <=> in new code.

>> Do we ever see us changing this from 64-bit integers to something else
>> ? If so, a macro would be much better.

> I don't see us changing it again any time soon. Maybe in 20 years time 
> people will start overflowing 2^64 bytes of WAL generated in the 
> lifetime of a database, but I don't think we need to start preparing for 
> that yet.

Note that to get to 2^64 in twenty years, an installation would have had
to have generated an average of 29GB of WAL per second, 24x7 for the
entire twenty years, with never a dump-and-reload.  We're still a few
orders of magnitude away from needing to think about this.

But, if the day ever comes when 64 bits doesn't seem like enough, I bet
we'd move to 128-bit integers, which will surely be available on all
platforms by then.  So +1 for using plain comparisons --- in fact, I'd
vote for running around and ripping out the macros altogether.  I had
already been thinking of fixing the places that are still using memset
to initialize XLRecPtrs to "invalid".
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Error restoring from a base backup taken from standby
Следующее
От: Andres Freund
Дата:
Сообщение: Re: XLByte* usage