Re: Init connection time grows quadratically

From: "Maksim(dot)Melnikov" <m(dot)melnikov(at)postgrespro(dot)ru>
To: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Init connection time grows quadratically
Date: 2026-08-25 06:45:17
Message-ID: a46c4fce-cfb2-470b-87ca-5cc01d6f0901@postgrespro.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 8/12/26 23:19, Matthias van de Meent wrote:
> On Fri, 7 Aug 2026 at 16:05, Maksim.Melnikov<m(dot)melnikov(at)postgrespro(dot)ru> wrote:
>> On 7/17/26 11:54, Matthias van de Meent wrote:
>>> On Thu, 11 Jun 2026 at 16:31, Maksim.Melnikov<m(dot)melnikov(at)postgrespro(dot)ru> wrote:
>>>> Patch with fixes was attached. Thanks for review.
>>> You removed the pgxactoff field with its comment from PGPROC, but
>>> haven't yet added a comment on PROC_HDR's pgxactoffs. Please add a
>>> comment to the pgxactoffs array that describes its contents. A simple
>>> adaptation of the comment removed with PGPROC's pgxactoff field should
>>> be sufficient.
>>>
>>> The comments on PROC_HDR and PGPROC also reference the deleted
>>> PGPROC->pgxactoff field, so that also must be adjusted; there may be
>>> several other places, as I didn't do a full check on the codebase.
>>>
>>> Once the relevant comments are added and adjusted I think this is
>>> ready for a committer.
>>>
>>>
>>> Kind regards,
>>>
>>> Matthias van de Meent
>>> Databricks (https://www.databricks.com)
>>>
>>>
>> Sorry for the delay, was unavailable for several weeks.
>>
>> Thanks for review, patch was updated.
> I noticed this patch wasn't registered at the commitfest yet, so I
> took the liberty to do that for you. It's registered at [0].
Thanks!
> The CFBot then noticed crashes caused by the patch in various tests,
> which I think can be caused by a lack of initialization of pgxactoffs
> in ProcArrayShmemAttach, but I haven't worked on a fix.
Yes, thanks, there was the problem with alignment of pgxactoff array on
shmem, I've fixed it with re-ordering of
elements. Also I've rebased master and noticed new commit c6d55714ba4,
that introduced new shmem alloc functions, so I've added minor fix.
I've attached incremental patch for ease of review of last CI fixes.
> Attached are some copy-edits of comments on top of your v3, and a
> missed replacement of "GetNumberFromPGProc(MyProc)" with
> "MyProcNumber".
>
> This is an incremental patch on your v3, and doesn't fix the CFBot failures.

Thanks. I've attached overall patch with your edits for commitfest too.

Kind regards

Melnikov Maksim

Attachment Content-Type Size
incremental-CI-fixes-with-rebase.patch text/x-patch 1.1 KB
v5-0001-This-patch-reduce-connection-init-close-time.patch text/x-patch 17.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-08-25 06:52:27 Re: Fix signed/unsigned integer handling in pg_restore_relation_stats()
Previous Message Amit Kapila 2026-08-25 06:38:10 Re: Support EXCEPT for TABLES IN SCHEMA publications