With PgBouncer its track_extra_parameters setting you can make PgBouncer track other GUCs than the default few parameters (client_encoding, application_name, etc). But this only works for GUCs that have the GUC_REPORT flag set. Especially search_path is a GUC that people really want to track, but does not have GUC_REPORT set currently. We could easily set that from this extension, Citus actually does that. Getting support for this upstream would be best, but takes forever and doesn't work on old PG versions.
Relevant links:
- Trying to get search_path to be GUC_REPORT upstream: https://www.postgresql.org/message-id/flat/CAFh8B%3Dk8s7WrcqhafmYhdN1%2BE5LVzZi_QaYDq8bKvrGJTAhY2Q%40mail.gmail.com
- Docs for track_extra_parameters: https://www.pgbouncer.org/config.html#track_extra_parameters
- Making GUC_REPORT configurable for every GUC upstream: https://www.postgresql.org/message-id/flat/CAGECzQRbjxi72uY_b7MQaqG%3DYnDRvpo5imDniPtZsufj8WahTA%40mail.gmail.com#7d47fa745e32d83975b69136c50786bf
- Citus setting the GUC_REPORT flag for search_path: https://github.com/citusdata/citus/blob/fcc72d8a23da8e0f7ef91bf77077abba9796867d/src/backend/distributed/shared_library_init.c#L2711-L2720
With PgBouncer its
track_extra_parameterssetting you can make PgBouncer track other GUCs than the default few parameters (client_encoding, application_name, etc). But this only works for GUCs that have the GUC_REPORT flag set. Especiallysearch_pathis a GUC that people really want to track, but does not have GUC_REPORT set currently. We could easily set that from this extension, Citus actually does that. Getting support for this upstream would be best, but takes forever and doesn't work on old PG versions.Relevant links: