Re: Modernizing our GUC infrastructure
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2022-09-06T05:25:14Z
Lists: pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes: > The bad performance is not the main reason for implementing session > variables (and in almost all cases the performance of GUC is not a problem, > because it is not a bottleneck, and in some terrible cases, I can save the > GUC to a variable). There are other differences: Well, yeah, the schema-variables patch offers a bunch of other features. What I'm not sure about is whether there's actually much field demand for those. I think if we fix guc.c's performance issues and add some simple features on top of that, like the ability to declare bool, int, float data types not just string for a user-defined GUC, we'd have exactly what a lot of people want --- not least because it'd be upwards-compatible with what they are already doing. However, that's probably a debate to have on the other thread not here. This patch doesn't foreclose pushing forward with the schema-variables patch, if people want that. regards, tom lane
Commits
-
Add auxiliary lists to GUC data structures for better performance.
- f13b2088fa2d 16.0 landed
-
Replace the sorted array of GUC variables with a hash table.
- 3057465acfbe 16.0 landed
-
Store GUC data in a memory context, instead of using malloc().
- 407b50f2d421 16.0 landed
-
Make some minor improvements in memory-context infrastructure.
- 9c911ec065df 16.0 landed