PG-606: New GUC required for enabling/disabling of pgsm_query_id calculation… (#383)

* PG-606: New GUC required for enabling/disabling of pgsm_query_id calculation

Adds a new GUC pg_stat_monitor.pgsm_enable_pgsm_query_id to enable/disable
pgsm query id calculation. Apart from that patch also refactors the GUC-related
code to match PostgreSQL conventions.

Moreover, the commit also changes the pgsm_enable_overflow GUC to boolean
instead of enum.
This commit is contained in:
Muhammad Usama
2023-02-23 19:08:09 +05:00
committed by GitHub
parent ce32f6f15d
commit 05ffcac2fa
16 changed files with 458 additions and 459 deletions

View File

@@ -124,7 +124,7 @@ pgsm_startup(void)
/* If overflow is enabled, set the DSA size to unlimited,
* and allow the DSA to grow beyond the shared memory space
* into the swap area*/
if (PGSM_OVERFLOW_TARGET == OVERFLOW_TARGET_DISK)
if (pgsm_enable_overflow)
dsa_set_size_limit(dsa, -1);
pgsmStateLocal.shared_pgsmState = pgsm;