I'm relatively new to the DBA field and I have read the official documentation/guides on this topic, but I apologize if my question seems weird.

I have deployed PostgreSQL 12 on my AWS instance and tried to install the pgaudit extension. In the postgresql.conf configuration file you need to add shared_preload_libraries = 'pgaudit' and restart the PostgreSQL service to apply the change.

I added shared_preload_libraries = 'pgaudit' in the very end of the config file and restarted pg_ctl, which caused the service to crash. Postgresql started operating normally once I commented out the added line.

Later I found the shared_preload_libraries parameter in that config file, it was already there, located a few blocks above, but also commented out. Once I uncommented it and set its value to 'pgaudit', my postgresql service started working normally and I managed to create an extension.

My question is: does it really matter in what order you list the parameters? Why didn't it work when I added the line in the end of the file, but worked, when the line was somewhere in the middle?

  • My recommendation is not to add parameters at the end of the file, but at the place where they are in the comment. That is not the cause of your problem though. Commented Mar 24, 2021 at 15:24

1 Answer 1


If you have several times the same parameter in postgresql.conf, the last value will override the previous ones.

I normally advise keeping the postgresql.conf file as short as possible to prevent confusion. See here.

My guess is that you misspelled something on the line you added. To be sure, you can look at Postgres logfiles which should tell you exactly what was wrong. (see here how to find your Postgres logfile.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.