public inbox for [email protected]  
help / color / mirror / Atom feed
Issue with installing postgres extension
4+ messages / 2 participants
[nested] [flat]

* Issue with installing postgres extension
@ 2024-06-26 23:22 bhavani dba <[email protected]>
  2024-06-26 23:43 ` Re: Issue with installing postgres extension Tom Lane <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: bhavani dba @ 2024-06-26 23:22 UTC (permalink / raw)
  To: [email protected]

I am having issues with postgres extensions and I have already installed
the contrib package.

thank you for the help!!

postgres=# CREATE EXTENSION pg_stat_statements;
ERROR:  could not load library
"/home/postgres/bin/pgsql/15/lib/pg_stat_statements.so":
/home/postgres/bin/pgsql/15/lib/pg_stat_statements.so: undefined symbol:
InitMaterializedSRF
postgres=#
postgres=# exit
[postgres@postgres ~]$ rpm -q postgresql15-contrib
postgresql15-contrib-15.7-3PGDG.rhel8.x86_64
[postgres@postgres ~]$ pg_config
BINDIR = /home/postgres/bin/pgsql/15/bin
DOCDIR = /home/postgres/bin/pgsql/15/share/doc
HTMLDIR = /home/postgres/bin/pgsql/15/share/doc
INCLUDEDIR = /home/postgres/bin/pgsql/15/include
PKGINCLUDEDIR = /home/postgres/bin/pgsql/15/include
INCLUDEDIR-SERVER = /home/postgres/bin/pgsql/15/include/server
LIBDIR = /home/postgres/bin/pgsql/15/lib
PKGLIBDIR = /home/postgres/bin/pgsql/15/lib
LOCALEDIR = /home/postgres/bin/pgsql/15/share/locale
MANDIR = /home/postgres/bin/pgsql/15/share/man
SHAREDIR = /home/postgres/bin/pgsql/15/share
SYSCONFDIR = /home/postgres/bin/pgsql/15/etc
PGXS = /home/postgres/bin/pgsql/15/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE =  '--prefix=/home/postgres/bin/pgsql/15'
CC = gcc
CPPFLAGS = -D_GNU_SOURCE
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Werror=vla -Wendif-labels
-Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type
-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-Wno-format-truncation -Wno-stringop-truncation -O2
CFLAGS_SL = -fPIC
LDFLAGS = -Wl,--as-needed
-Wl,-rpath,'/home/postgres/bin/pgsql/15/lib',--enable-new-dtags
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lz -lreadline -lpthread -lrt -ldl -lm
VERSION = PostgreSQL 15.0
[postgres@postgres ~]$ cd /home/postgres/bin/pgsql/15/lib
[postgres@postgres lib]$ ls
cyrillic_and_mic.so    libecpg.a               libpgcommon_shlib.a
 libpq.so                    plpgsql.so            utf8_and_gb18030.so
dict_snowball.so       libecpg_compat.a        libpgfeutils.a
libpq.so.5                  repmgr.so             utf8_and_gbk.so
euc2004_sjis2004.so    libecpg_compat.so       libpgport.a
 libpq.so.5.15               utf8_and_big5.so      utf8_and_iso8859_1.so
euc_cn_and_mic.so      libecpg_compat.so.3     libpgport_shlib.a
 libpqwalreceiver.so         utf8_and_cyrillic.so  utf8_and_iso8859.so
euc_jp_and_sjis.so     libecpg_compat.so.3.15  libpgtypes.a
pgoutput.so                 utf8_and_euc2004.so   utf8_and_johab.so
euc_kr_and_mic.so      libecpg.so              libpgtypes.so
 pg_stat_statements.control  utf8_and_euc_cn.so    utf8_and_sjis2004.so
euc_tw_and_big5.so     libecpg.so.6            libpgtypes.so.3
 pg_stat_statements.so       utf8_and_euc_jp.so    utf8_and_sjis.so
latin2_and_win1250.so  libecpg.so.6.15         libpgtypes.so.3.15   pgxs
                     utf8_and_euc_kr.so    utf8_and_uhc.so
latin_and_mic.so       libpgcommon.a           libpq.a
 pkgconfig                   utf8_and_euc_tw.so    utf8_and_win.so
[postgres@postgres lib]$ psqll
bash: psqll: command not found...
Similar command is: 'psql'
[postgres@postgres lib]$ psql
psql (15.7, server 15.0)
Type "help" for help.

postgres=#



-- 
Thanks & Regards,

BHAVANI DHULIPALLA
(973)-615-0290


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

* Re: Issue with installing postgres extension
  2024-06-26 23:22 Issue with installing postgres extension bhavani dba <[email protected]>
@ 2024-06-26 23:43 ` Tom Lane <[email protected]>
  2024-06-27 01:08   ` Re: Issue with installing postgres extension bhavani dba <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2024-06-26 23:43 UTC (permalink / raw)
  To: bhavani dba <[email protected]>; +Cc: [email protected]

bhavani dba <[email protected]> writes:
> postgres=# CREATE EXTENSION pg_stat_statements;
> ERROR:  could not load library
> "/home/postgres/bin/pgsql/15/lib/pg_stat_statements.so":
> /home/postgres/bin/pgsql/15/lib/pg_stat_statements.so: undefined symbol:
> InitMaterializedSRF

This certainly looks like you are trying to load a v15 extension
into a pre-v15 server (since the InitMaterializedSRF function
didn't exist in prior versions).

I'm going to go out on a limb and guess that you just installed
v15 and forgot to restart the server, so that what's running is
still v14 or before.  If so, you probably also forgot the
pg_upgrade step --- you can't simply start a new major version
in an old one's data directory.

			regards, tom lane






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

* Re: Issue with installing postgres extension
  2024-06-26 23:22 Issue with installing postgres extension bhavani dba <[email protected]>
  2024-06-26 23:43 ` Re: Issue with installing postgres extension Tom Lane <[email protected]>
@ 2024-06-27 01:08   ` bhavani dba <[email protected]>
  2024-06-27 02:25     ` Re: Issue with installing postgres extension Tom Lane <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: bhavani dba @ 2024-06-27 01:08 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: [email protected]

thank you for tom for your response. i dont remember installing postgres 14
version on the server and it seems like I have postgres 15 running.

Please see below.

[postgres@postgres ~]$ psql
psql (15.7, server 15.0)
Type "help" for help.

postgres=#

postgres=# CREATE EXTENSION pg_stat_statements;
ERROR:  could not load library
"/home/postgres/bin/pgsql/15/lib/pg_stat_statements.so":
/home/postgres/bin/pgsql/15/lib/pg_stat_statements.so: undefined symbol:
InitMaterializedSRF
postgres=#
postgres=# SELECT version();
                                                  version
------------------------------------------------------------------------------------------------------------
 PostgreSQL 15.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1
20191121 (Red Hat 8.3.1-5.0.1), 64-bit
(1 row)


On Wed, Jun 26, 2024 at 7:43 PM Tom Lane <[email protected]> wrote:

> bhavani dba <[email protected]> writes:
> > postgres=# CREATE EXTENSION pg_stat_statements;
> > ERROR:  could not load library
> > "/home/postgres/bin/pgsql/15/lib/pg_stat_statements.so":
> > /home/postgres/bin/pgsql/15/lib/pg_stat_statements.so: undefined symbol:
> > InitMaterializedSRF
>
> This certainly looks like you are trying to load a v15 extension
> into a pre-v15 server (since the InitMaterializedSRF function
> didn't exist in prior versions).
>
> I'm going to go out on a limb and guess that you just installed
> v15 and forgot to restart the server, so that what's running is
> still v14 or before.  If so, you probably also forgot the
> pg_upgrade step --- you can't simply start a new major version
> in an old one's data directory.
>
>                         regards, tom lane
>


-- 
Thanks & Regards,

BHAVANI DHULIPALLA
(973)-615-0290


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

* Re: Issue with installing postgres extension
  2024-06-26 23:22 Issue with installing postgres extension bhavani dba <[email protected]>
  2024-06-26 23:43 ` Re: Issue with installing postgres extension Tom Lane <[email protected]>
  2024-06-27 01:08   ` Re: Issue with installing postgres extension bhavani dba <[email protected]>
@ 2024-06-27 02:25     ` Tom Lane <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2024-06-27 02:25 UTC (permalink / raw)
  To: bhavani dba <[email protected]>; +Cc: [email protected]

bhavani dba <[email protected]> writes:
> thank you for tom for your response. i dont remember installing postgres 14
> version on the server and it seems like I have postgres 15 running.

> [postgres@postgres ~]$ psql
> psql (15.7, server 15.0)
> Type "help" for help.

Hmm ... after poking around a bit, it appears you are trying to load
extension code compiled against 15.1 or later into a 15.0 server.
Possibly we should have thought a bit harder about the compatibility
implications of commit f2f7e509e.  Nonetheless, what are you doing
running a 15.0 server?  That was many minor releases and bug fixes
ago.

			regards, tom lane






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


end of thread, other threads:[~2024-06-27 02:25 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-06-26 23:22 Issue with installing postgres extension bhavani dba <[email protected]>
2024-06-26 23:43 ` Tom Lane <[email protected]>
2024-06-27 01:08   ` bhavani dba <[email protected]>
2024-06-27 02:25     ` Tom Lane <[email protected]>

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