Re: Xact end leaves CurrentMemoryContext = TopMemoryContext

pavel seleznev <pavel.seleznev@gmail.com>

From: pavel seleznev <pavel.seleznev@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-09-26T17:38:43Z
Lists: pgsql-hackers
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?

Regards,
Pavel Seleznev

Commits

  1. Split vacuumdb to create vacuuming.c/h

  2. Preserve CurrentMemoryContext across notify and sinval interrupts.

  3. Preserve CurrentMemoryContext across Start/CommitTransactionCommand.