pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Issues with using plpgsql debugger using PG13 on Centos 7
3+ messages / 2 participants
[nested] [flat]

* Issues with using plpgsql debugger using PG13 on Centos 7
@ 2021-02-02 03:05  Jain, Ankit <Ankit.Jain@snapon.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Jain, Ankit @ 2021-02-02 03:05 UTC (permalink / raw)
  To: pgsql-general

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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Issues with using plpgsql debugger using PG13 on Centos 7
@ 2021-02-02 07:53  Ian Lawrence Barwick <barwick@gmail.com>
  parent: Jain, Ankit <Ankit.Jain@snapon.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Ian Lawrence Barwick @ 2021-02-02 07:53 UTC (permalink / raw)
  To: Jain, Ankit <Ankit.Jain@snapon.com>; +Cc: pgsql-general

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

-- 
EnterpriseDB: https://www.enterprisedb.com

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* RE: Issues with using plpgsql debugger using PG13 on Centos 7
@ 2021-03-31 15:58  Jain, Ankit <Ankit.Jain@snapon.com>
  parent: Ian Lawrence Barwick <barwick@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Jain, Ankit @ 2021-03-31 15:58 UTC (permalink / raw)
  To: Ian Lawrence Barwick <barwick@gmail.com>; +Cc: pgsql-general

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.
2021年2月2日(火) 12:06 Jain, Ankit <Ankit.Jain@snapon.com<mailto: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

--
EnterpriseDB: https://www.enterprisedb.com<https://urldefense.com/v3/__https:/www.enterprisedb.com__;!!Lf_9VycL...;



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-03-31 15:58 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02 03:05 Issues with using plpgsql debugger using PG13 on Centos 7 Jain, Ankit <Ankit.Jain@snapon.com>
2021-02-02 07:53 ` Ian Lawrence Barwick <barwick@gmail.com>
2021-03-31 15:58   ` Jain, Ankit <Ankit.Jain@snapon.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox