Pivotal Knowledge Base

Follow

gpstart fails to start the database after changing parameters using gpconfig.

Problem

gpstart fails to start the database when parameters in the postgresql.conf file were changed using the gpconfig tool.

Cause

When using gpconfig to change the value of certain GUCs such as gp_email_to,  gp_email_from, it may omit the use of single quotes. Single quotes are required for the above parameters to work.

For example:

  • If you use the following syntax to change the email address :
gpconfig -c gp_email_to -v test1@email.com
  • This inserts a value similar to the following in the postgresql.conf file of all primaries+mirrors and master process. [Note, this does not have the single quotes which is mandatory for this parameter to work]:
gp_email_to=test@gmail.com
  • When attempting gpstart after this change, all segments including the master will fail to start 
Error from the startup.log:
2015-01-13 22:23:03.914090 GMT,,,p15480,th1825689712,,,,0,,,seg-1,,,,,"FATAL","42601","syntax error in file ""/data/master/gpfai4340-1/postgresql.conf"" line 527, near token ""@""",,,,,,,,"ParseConfigFile","guc-file.l",369,

Solution

  • First fix the master $MASTER_DATA_DIRECTORY/postgresql.conf file to reflect the correct syntax value of the parameter
gp_email_to='test@gmail.com'
  • Start the database is master-only mode :
gpstart -am
  •  Change the value for all segments:
gpconfig -c gp_email_to -v "'test1@gmail.com'"
  • Stop the master:
gpstop -am
  • Start the database in normal mode:
gpstart -a

Comments

Powered by Zendesk