| From: | Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru> |
|---|---|
| To: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Andres Freund <andres(at)anarazel(dot)de>, Sami Imseih <samimseih(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Subject: | Re: Fix bug in multixact Oldest*MXactId initialization and access |
| Date: | 2026-02-26 16:22:06 |
| Message-ID: | bf2951b4-687b-4bd3-a072-46deb463f177@postgrespro.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Good day.
Sami Imseih, I've introduced new precalculated variables:
MaxChildren = MaxBackends + NUM_AUXILIARY_PROCS;
TotalProcs = MaxChildren + max_prepared_xacts;
TotalXactProcs = MaxBackends + max_prepared_xacts;
and spread their usage through the sources.
I don't know how committers will accept this change. But they will
certainly make their own version of patch, so I don't bother much.
But I still use inline procs for access to the arrays. Asserts cost nothing
in release build. And new version of functions doesn't branch.
And you're right: looks like there were mistake in previous version so
GetOldestVisibleMXactId became unused. New version has no this mistake.
Chao Li, new access functions doen't branch because I've made separate
functions to store at slots for prepared transactions.
--
regards
Yura Sokolov aka funny-falcon
| Attachment | Content-Type | Size |
|---|---|---|
| v4-0001-Add-precalculated-proc-counts-to-reduce-repetitio.patch | text/x-patch | 15.7 KB |
| v4-0002-Fix-multixacts-OldestMemberMXactId-and-OldestVisi.patch | text/x-patch | 10.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2026-02-26 16:27:04 | Re: pgstat include expansion |
| Previous Message | Fujii Masao | 2026-02-26 16:19:46 | Re: Shutdown indefinitely stuck due to unflushed FPI_FOR_HINT record |