gpdb icon indicating copy to clipboard operation
gpdb copied to clipboard

gpconfig behavior improvement on changin GUCs of postgres instance

Open CC-Hsu opened this issue 5 years ago • 2 comments

Hi, Team,

PGSQL 9.4 introduces ALTER SYSTEM command for modifying GUCs inside database instances. https://paquier.xyz/postgresql-2/postgres-9-4-feature-highlight-alter-system-set-for-dynamic-configuration/ https://www.cybertec-postgresql.com/en/setting-postgresql-configuration-parameters/ https://www.postgresql.org/docs/9.4/sql-altersystem.html

This helps users managing their GUCs elegantly.

But currently gpconfig command still changes postgresql.conf on all instances.

Maybe GPDB team can consider improving gpconfig behavior to utilize this feature.

Besides, you can make GPDB-specific GUCs collected into another config file, so that users can quickly figure out different types of GUCs when torubleshooting GPDB cluster.

Regards.

Greenplum version or build

All

OS version and uname -a

All

autoconf options used ( config.status --config )

N/A

Installation information ( pg_config )

N/A

Expected behavior

gpconfig add changed GUCs to postgresql.auto.conf

Actual behavior

gpconfig directly changes/appends GUCs to postgresql.conf

CC-Hsu avatar Nov 01 '20 03:11 CC-Hsu

Thanks for letting us know! We have made note of this.

It looks like more investigation and work may be needed to get ALTER SYSTEM working on Greenplum.

kalensk avatar Nov 03 '20 00:11 kalensk

Just notes for future reference

  • I would like postgresql.auto.conf to stay as internal server specific config file and not touched by entities/utilities possibly outside database
  • One option could to have if really required is to have utilities specific config file other than postgresql.auto.conf
  • I had attempted to make ALTER SYSTEM mpp aware a while back in my repo here
  • Even if ALTER SYSTEM is made MPP aware and made to work for GPDB, there are differences compared to gpconfig, main one being gpconfig works even when only coordinator is running and segments are stopped. Plus, also works for GUCs on mirror as operate at filesystem level outside the database. Whereas ALTER SYSTEM works via database so needs segments to be up to make the config change plus doesn't work for mirrors.

So, gpconfig will continue to have its usage in GPDB and ALTER SYSTEM (in MPP form) might help to cover some of the usecases but not all.

ashwinstar avatar Nov 03 '20 21:11 ashwinstar