From: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
---|---|
To: | Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com> |
Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, masao(dot)fujii(at)oss(dot)nttdata(dot)com, Ken Kato <katouknl(at)oss(dot)nttdata(dot)com>, Aleksander Alekseev <aleksander(at)timescale(dot)com> |
Subject: | Re: Is monotonous xid8 is a right way to do? |
Date: | 2022-04-01 12:33:05 |
Message-ID: | 87tubdouf2.fsf@wibble.ilmari.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com> writes:
> Hi hackers!
>
> Now we have two data types xid and xid8. The first one (xid) makes a
> numeric ring, and xid8 are monotonous.
>
> As per [1] "Unlike xid values, xid8 values increase strictly monotonically
> and cannot be reused in the lifetime of a database cluster."
>
> As a consequence of [1] xid8 can have min/max functions (committed in [2]),
> which xid can not have.
>
> When working on 64xid patch [3] we assume that even 64xid's technically can
> be wraparound-ed, although it's very much unlikely. I wonder what is
> expected to be with xid8 values at this (unlikely) 64xid wraparound?
Even if a cluster was consuming a million XIDs per second, it would take
over half a million years to wrap around the 64bit range. Is that really
something we should worry about?
ilmari(at)[local]:5432 ~=# select 2::numeric^64/10^9/3600/24/365;
┌──────────────────┐
│ ?column? │
├──────────────────┤
│ 584942.417355072 │
└──────────────────┘
- ilmari
From | Date | Subject | |
---|---|---|---|
Next Message | Maxim Orlov | 2022-04-01 12:36:28 | Re: Is monotonous xid8 is a right way to do? |
Previous Message | Masahiko Sawada | 2022-04-01 12:25:52 | Re: Skipping logical replication transactions on subscriber side |