postgres-ha icon indicating copy to clipboard operation
postgres-ha copied to clipboard

Postgres config changes not being applied

Open samuelbalogh opened this issue 3 years ago • 4 comments

Details

I would like to update the log-statement config variable to all. However, I am unable to do so with flyctl as the value remains unchanged.

 🍰   fly postgres config view
NAME                            VALUE   UNIT    DESCRIPTION                                                                                     PENDING RESTART
log-min-duration-statement      -1      ms      Sets the minimum execution time above which all statements will be logged. (-1, 2147483647)     false
log-statement                   none            Sets the type of statements logged. [none, ddl, mod, all]                                       false
max-connections                 300             Sets the maximum number of concurrent connections. (1, 262143)                                  false
shared-buffers                  8192    8kB     Sets the number of shared memory buffers used by the server. (16, 1073741823)                   false
shared-preload-libraries                        Lists shared libraries to preload into server.                                                  false
wal-level                       replica         Sets the level of information written to the WAL. [minimal, replica, logical]                   false

 🍰   fly postgres config update --log-statement all
NAME            VALUE   TARGET VALUE    RESTART REQUIRED
log-statement   none    all             false

? Are you sure you want to apply these changes? Yes
Performing update...
Update complete!
 🍰   fly postgres config view
NAME                            VALUE   UNIT    DESCRIPTION                                                                                     PENDING RESTART
log-min-duration-statement      -1      ms      Sets the minimum execution time above which all statements will be logged. (-1, 2147483647)     false
log-statement                   none            Sets the type of statements logged. [none, ddl, mod, all]                                       false
max-connections                 300             Sets the maximum number of concurrent connections. (1, 262143)                                  false
shared-buffers                  8192    8kB     Sets the number of shared memory buffers used by the server. (16, 1073741823)                   false
shared-preload-libraries                        Lists shared libraries to preload into server.                                                  false
wal-level                       replica         Sets the level of information written to the WAL. [minimal, replica, logical]                   false

Flyctl version

🍰   fly version
flyctl v0.0.443 linux/amd64 Commit: 63f03d09 BuildDate: 2023-01-05T21:09:40Z

OS

Ubuntu 20.04 on WSL2.

samuelbalogh avatar Jan 09 '23 17:01 samuelbalogh

There we had introduced a bug in the flyctl pg config update command but that should be fixed in the latest release: https://github.com/superfly/flyctl/releases/tag/v0.0.444

rugwirobaker avatar Jan 09 '23 18:01 rugwirobaker

Thanks @rugwirobaker for the quick reply. I confirm that the config update works now 💪 .

Minor issue is that after the update command I get an error message (even though the update was successful).

? Are you sure you want to apply these changes? Yes
Performing update...
Error unexpected end of JSON input

samuelbalogh avatar Jan 09 '23 18:01 samuelbalogh

Great catch, I'll look into it.

rugwirobaker avatar Jan 09 '23 19:01 rugwirobaker

That error should go away once this feature is transitioned to run over http.

davissp14 avatar Jan 10 '23 15:01 davissp14