Re: FW: query pg_stat_ssl hang 100%cpu
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: "James Pang (chaolpan)" <chaolpan@cisco.com>
Cc: Michael Paquier <michael@paquier.xyz>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2023-09-07T23:45:51Z
Lists: pgsql-bugs, pgsql-performance
Attachments
- 0001-Fix-exception-safety-bug-in-typcache.c.patch (text/x-patch) patch 0001
On Thu, Sep 7, 2023 at 10:59 PM Thomas Munro <thomas.munro@gmail.com> wrote: > On Thu, Sep 7, 2023 at 10:39 PM James Pang (chaolpan) > <chaolpan@cisco.com> wrote: > > (gdb) p RecordCacheArray > > $1 = (TupleDesc *) 0x7f5fac365d90 > > (gdb) p RecordIdentifierArray > > $2 = (uint64 *) 0x0 > > Hah, yeah that's it, and you've been extremely unlucky to hit it. > ensure_record_cache_typmod_slot_exists() should be more careful about > cleaning up on allocation failure, to avoid this state. I think the lazy fix would be to re-order those allocations. A marginally more elegant fix would be to merge the arrays, as in the attached. Thoughts?
Commits
-
Fix exception safety bug in typcache.c.
- f899c7f1eae4 16.1 landed
- 3acd0599bd8e 17.0 landed
- 6ae57f190e27 11.22 landed
- 012b80ad20c2 12.17 landed
- 189097db822d 13.13 landed
- e2452c2a630a 14.10 landed
- a26cc0334f8b 15.5 landed