Thread: Issues with using plpgsql debugger using PG13 on Centos 7

Issues with using plpgsql debugger using PG13 on Centos 7

From
"Jain, Ankit"
Date:

Hi,

 

I am trying to setup the debugger plugin on Centos 7 where PG 13 server has been setup using the git repository located here - https://git.postgresql.org/gitweb/?p=pldebugger.git;a=summary

The OS version is CentOS Linux release 7.9.2009 (Core).

 

However, after making the changes to postgresql.conf to reference the plugin_debugger.so library that was created on CentOS 7 using several variations to ensure that the .so file was being referenced -

shared_preload_libraries = '/usr/lib64/pgsql/plugin_debugger'

or

shared_preload_libraries = 'plugin_debugger'

or

shared_preload_libraries = '/usr/pgsql-13/lib/plugin_debugger.so'

 

I encountered the following error during postgres start up–

-- Unit postgresql-13.service has begun starting up.

Feb 01 21:53:20 myserver.com postmaster[22726]: 2021-02-02 02:53:20.482 GMT [22726] LOG:  skipping missing configuration file "/data/pgdata/data/postgresql.auto.conf"

Feb 01 21:53:20 myserver.com postmaster[22726]: 2021-02-01 21:53:20.485 EST [22726] FATAL:  could not load library "/usr/lib64/pgsql/plugin_debugger.so": /usr/lib64/pgsql/plug

Feb 01 21:53:20 myserver.com postmaster[22726]: 2021-02-01 21:53:20.486 EST [22726] LOG:  database system is shut down

Feb 01 21:53:20 myserver.com systemd[1]: postgresql-13.service: main process exited, code=exited, status=1/FAILURE

Feb 01 21:53:20 myserver.com systemd[1]: Failed to start PostgreSQL 13 database server.

-- Subject: Unit postgresql-13.service has failed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- Unit postgresql-13.service has failed.

--

-- The result is failed.

Feb 01 21:53:20 rich-arch-01-pp.ipa.snapbs.com systemd[1]: Unit postgresql-13.service entered failed state.

Feb 01 21:53:20 rich-arch-01-pp.ipa.snapbs.com systemd[1]: postgresql-13.service failed.

 

 

Though the library wasn’t loaded, I attempted to add the extension at the DB level using

CREATE EXTENSION pldbgapi;

 

But got the following error –

ERROR: could not load library "/usr/pgsql-13/lib/plugin_debugger.so": /usr/pgsql-13/lib/plugin_debugger.so: undefined symbol: LWLockAssign SQL state: 58P01

 

Can you please help with getting the debugger working ?

 

Thanks

Ankit

Re: Issues with using plpgsql debugger using PG13 on Centos 7

From
Ian Lawrence Barwick
Date:
2021年2月2日(火) 12:06 Jain, Ankit <Ankit.Jain@snapon.com>:
(...)

But got the following error –

ERROR: could not load library "/usr/pgsql-13/lib/plugin_debugger.so": /usr/pgsql-13/lib/plugin_debugger.so: undefined symbol: LWLockAssign SQL state: 58P01

 

Can you please help with getting the debugger working ?


It looks like the extension code was compiled against an older PostgreSQL
version (presumably 9.5 or earlier; LWLockAssign was removed in 9.6).

You'll need to make sure it's compiled against the major version you're using.

Regards

Ian Barwick

--

RE: Issues with using plpgsql debugger using PG13 on Centos 7

From
"Jain, Ankit"
Date:

Thank you for the pointer. We were able to build it correctly after setting the PG-13 path

PATH=$PATH:/usr/pgsql-13/bin

 

From: Ian Lawrence Barwick <barwick@gmail.com>
Sent: Tuesday, February 2, 2021 2:54 AM
To: Jain, Ankit <Ankit.Jain@snapon.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Issues with using plpgsql debugger using PG13 on Centos 7

 

CAUTION: This email originated from outside of Snap-on. Do not click on links or open attachments unless you have validated the sender, even if it is a known contact. Contact the sender by phone to validate the contents.

202122() 12:06 Jain, Ankit <Ankit.Jain@snapon.com>:

(...)

But got the following error –

ERROR: could not load library "/usr/pgsql-13/lib/plugin_debugger.so": /usr/pgsql-13/lib/plugin_debugger.so: undefined symbol: LWLockAssign SQL state: 58P01

 

Can you please help with getting the debugger working ?

 

It looks like the extension code was compiled against an older PostgreSQL
version (presumably 9.5 or earlier; LWLockAssign was removed in 9.6).

You'll need to make sure it's compiled against the major version you're using.

 

Regards

 

Ian Barwick

 

--