Re: Usage of epoch in txid_current

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Subject: Re: Usage of epoch in txid_current
Date: 2019-03-26 20:14:47
Message-ID: CA+hUKGLW+h1pLcLDnw6RwGnPs+1TTRG2r+Au1+gBH6bH5y2HXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 26, 2019 at 12:58 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> ... I think you could probably reclaim that space by
> using a more compact representation of vacuumFlags, overflowed,
> delayChkpt, nxids (it's funny, the comment says "as tightly as
> possible", which clearly isn't the case).

Woops, I take that back. I was thinking of sizeof(bool) == 4, but
it's usually 1, so you could probably only squeeze a couple of bytes
out by moving those flags. allPgXact elements are currently 12 bytes
apart on this system. It's possible that expanding it to 16 bytes
would be OK, not sure, and I see there was a whole thread
investigating that a couple of years back:

https://www.postgresql.org/message-id/flat/CAPpHfdtJY4zOEDsjad6J5AyZMqZcv6gSY9AkKpA7qN3jyQ2%2B1Q%40mail.gmail.com

--
Thomas Munro
https://enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2019-03-26 21:25:16 Re: pgsql: Get rid of backtracking in jsonpath_scan.l
Previous Message Tomas Vondra 2019-03-26 20:04:53 Re: explain plans with information about (modified) gucs