Re: tracking commit timestamps

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Petr Jelinek <petr(at)2ndquadrant(dot)com>, Steve Singer <steve(at)ssinger(dot)info>, Andres Freund <andres(at)2ndquadrant(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Anssi Kääriäinen <anssi(dot)kaariainen(at)thl(dot)fi>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Subject: Re: tracking commit timestamps
Date: 2014-11-10 01:41:58
Message-ID: 20141110014158.GY1791@alvin.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-www

Robert Haas wrote:

> I think the key question here is the time for which the data needs to
> be retained. 2^32 of anything is a lot, but why keep around that
> number of records rather than more (after all, we have epochs to
> distinguish one use of a given txid from another) or fewer?

The problem is not how much data we retain; is about how much data we
can address. We must be able to address the data for transaction with
xid=2^32-1, even if you only retain the 1000 most recent transactions.
In fact, we already only retain data back to RecentXmin, if I recall
correctly. All slru.c users work that way.

Back when pg_multixact/members had the 5-char issue, I came up with a
patch that had each slru.c user declare how many chars maximum were the
filenames. I didn't push further with that because there was an issue
with it, I don't remember what it was offhand (but I don't think I
posted it). But this is only needed so that the filenames are all equal
width, which is mostly cosmetical; the rest of the module works fine
with 4- or 5-char filenames, and can be trivially expanded to support 6
or more.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-11-10 01:46:42 Re: BRIN indexes - TRAP: BadArgument
Previous Message Petr Jelinek 2014-11-10 00:39:02 Re: Sequence Access Method WIP

Browse pgsql-www by date

  From Date Subject
Next Message Anssi Kääriäinen 2014-11-10 07:01:06 Re: tracking commit timestamps
Previous Message Steve Singer 2014-11-09 16:57:53 Re: tracking commit timestamps