The debugger may be used to debug PL/pgSQL functions in PostgreSQL, as well as EDB-SPL functions, stored procedures and packages in EDB Postgres Advanced Server. The pldebugger is available as an extension for your PostgreSQL database.
For this guide we have already set up PostgreSQL version 12 on a Ubuntu 20.04. These instructions can also be applied if you are running an earlier or later release of PostgreSQL in your environment.
Install Prerequisites
Clone pldebugger
Install Debugger
You will need to set appropriate permission on the following directories: Now revert the permission back to root: Next, edit postgresql.conf file with any of your favorite text editor: Find the following line, uncomment and add plugin_debugger like below:Save and close the editor when you are finished.
Restart PostgreSQL to take changes into effect:
Next, connect to a PostgreSQL database, you would like to enable debugging and type below on postgres=# prompt to install the pldbgapi extension:
Wrapping up
You now have successfully installed pldebugger for your PostgreSQL database on Ubuntu 18/19/20.04.
Thank you very much, excellent guide.
ReplyDeleteJust add two things, in Ubuntu 20.04 it is required to install clang-10:
$ sudo apt install clang-10
And the directory "/usr/share/doc/postgresql-doc-12" does not exist, it must be created:
$ sudo mkdir /usr/share/doc/postgresql-doc-12