Google News
logo
PostgreSQL - Interview Questions
What is the command to enable debug and explain it a little?
To enable debug in Postgres, we’ll have to enable the below shared library as shown below.
 
# Edit the entry to add the library ‘plugin_debugger’ :
shared_preload_libraries = ‘plugin_debugger’

Restart PostgreSQL
sudo service postgresql stop
sudo service postgresql start
To enable this extension in PostgreSQL
 
The following is done at each DB level, not instance level. So log into the DB and run following SQL :
CREATE EXTENSION pldbgapi;​

 

The above mentioned command is used for enabling the compilation of all libraries and applications.
 
This process generally slows down the system and it also increases the binary file size. Debugging symbols are present which can assist developers in noticing bugs and problems associated with their script.
Advertisement