Nick
Nick

Reputation: 9061

Is there any way to check already preload libraries in psql or command line?

In conf we added the following line:

shared_preload_libraries = 'passwordcheck'

After restart postgres, password check is supposed to take effect, and I can test by creating a simple password for the new role. My question is:

Is there any way to list preloaded (enabled) libraries, or show this lib has been successfully loaded?

Upvotes: 9

Views: 8667

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 247445

You can examine the current setting of shared_preload_libraries to see which libraries were loaded at server start time. You can be certain that these libraries are loaded, because otherwise the server would have refused to start and stopped with an error message.

But there are many other ways to load an extension shared library into PostgreSQL, for example by calling C functions or using the LOAD statement. There is no way in PostgreSQL to determine all libraries that are currently loaded into your database backend process.

Upvotes: 12

Related Questions