I accidentally ran

ALTER DATABASE mydb SET session_preload_libraries = ''; -- empty string

and now I can't log in to my PostgreSQL (v.14) database. I'm getting

[58P01] FATAL: could not access file "": No such file or directory

Is there any way to fix this? I can't execute any command because of this error

2 Answers 2


Connect to some other database, like 'postgres' or 'template1', and reset the parameter.

If there are no other databases you can connect to, then you might need to restart the cluster in --single mode to fix it.


The offending setting should be in a postgresql.auto.conf file of your cluster's data directory. Edit that file and restart the cluster to fix the problem.

  • Please explain what setting? Sep 26, 2023 at 9:08
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Sep 26, 2023 at 9:08

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.