From: | "Finnerty, Jim" <jfinnert(at)amazon(dot)com> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net>, Maxim Orlov <orlovmg(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add 64-bit XIDs into PostgreSQL 15 |
Date: | 2022-01-04 22:22:50 |
Message-ID: | CB919F14-2B98-4CD3-84C0-91945E9E7EF5@amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 1/4/22, 2:35 PM, "Stephen Frost" <sfrost(at)snowman(dot)net> wrote:
>>
>> Not saying that I've got any idea how to fix that case offhand, and we
>> don't really support such a thing today as the server would just stop
>> instead, ...
>> Perhaps that's a
>> worthwhile tradeoff for being able to generally avoid having to vacuum
>> and deal with transaction wrap-around, but I have to wonder if there
>> might be a better answer.
>>
For the target use cases that PostgreSQL is designed for, it's a very worthwhile tradeoff in my opinion. Such long-running transactions need to be killed.
Re: -- If after upgrade page has no free space for special data, tuples are
converted to "double xmax" format: xmin became virtual
FrozenTransactionId, xmax occupies the whole 64bit.
Page converted to new format when vacuum frees enough space.
I'm concerned about the maintainability impact of having 2 new on-disk page formats. It's already complex enough with XIDs and multixact-XIDs.
If the lack of space for the two epochs in the special data area is a problem only in an upgrade scenario, why not resolve the problem before completing the upgrade process like a kind of post-process pg_repack operation that converts all "double xmax" pages to the "double-epoch" page format? i.e. maybe the "double xmax" representation is needed as an intermediate representation during upgrade, but after upgrade completes successfully there are no pages with the "double-xmax" representation. This would eliminate a whole class of coding errors and would make the code dealing with 64-bit XIDs simpler and more maintainable.
/Jim
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-01-04 22:30:59 | Re: Consider parallel for lateral subqueries with limit |
Previous Message | Tom Lane | 2022-01-04 21:54:29 | Re: A spot of redundant initialization of brin memtuple |