Re: Xact end leaves CurrentMemoryContext = TopMemoryContext

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pavel seleznev <pavel(dot)seleznev(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Xact end leaves CurrentMemoryContext = TopMemoryContext
Date: 2025-09-26 17:53:32
Message-ID: 4097142.1758909212@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

pavel seleznev <pavel(dot)seleznev(at)gmail(dot)com> writes:
> Hello,
> Should we use the same approach on line 1106 (
> https://github.com/postgres/postgres/blob/c4067383cb2c155c4cfea2351036709e2ebb3535/src/backend/libpq/hba.c#L1106
> )
> as on line 266 (
> https://github.com/postgres/postgres/blob/c4067383cb2c155c4cfea2351036709e2ebb3535/src/backend/tcop/backend_startup.c#L266
> )
> since they reference the same structure?

I see no reason to change either one. BackendInitialize is
explicitly choosing not to run in TopMemoryContext, which is fine,
but that doesn't mean that other code has to do the same.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2025-09-26 18:04:21 Re: Changing shared_buffers without restart
Previous Message Tom Lane 2025-09-26 17:46:19 Re: [PATCH] GROUP BY ALL