Re: 回复: Fix segfault while accessing half-initialized hash table in pgstat_shmem.c
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Rider <oceanustz@gmail.com>
Cc: Steven Niu <niushiji@gmail.com>, Mikhail Kot <mikhail.kot@databricks.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, "to@myrrc.dev" <to@myrrc.dev>
Date: 2025-09-06T01:05:07Z
Lists: pgsql-hackers
On Thu, Sep 04, 2025 at 03:49:19PM +0800, Rider wrote: > And, the PG_RE_THROW() within the PG_CATCH block causes a non-local jump, > immediately aborting the current execution path to handle the error at a > higher level. This guarantees that the code following PG_END_TRY is > unreachable in the error scenario. Please see details in utils/elog.h, if you want to study this area of the code of course. There is a large portion about volatile variables and compiler expectations which is also very interested to know about. And that's useful if you write your own extension code, outside of the core Postgres code. -- Michael
Commits
-
Fix corruption of pgstats shared hashtable due to OOM failures
- 1852ec5db5d8 15.15 landed
- 12f57681c79b 16.11 landed
- 3e6dfcfb0529 17.7 landed
- f256a7bba728 18.0 landed
- 8191e0c16a03 19 (unreleased) landed