Thread: Installing extension temporal_tables for PG13
Running Centos7 and PG13. I'd like to install the temporal_tables extension but it does not seem to exist in postgresql13-contrib. I did find the source code at https://github.com/arkhipov3/temporal_tables which suggests to use the pgxn client to installit. The link to this client found on this page - pgxnclient.projects.pgfoundry.org - however, is non-functional. Am I correct in that I need to either find the client pgxn alternatively install the development environment and compilethe source code for this extension? Thank you.
On 11/27/23 15:37, H wrote: > Running Centos7 and PG13. I'd like to install the temporal_tables extension but it does not seem to exist in postgresql13-contrib. If it is not here: https://www.postgresql.org/docs/13/contrib.html then it won't be in postgresql13-contrib. > > I did find the source code at https://github.com/arkhipov3/temporal_tables which suggests to use the pgxn client to installit. The link to this client found on this page - pgxnclient.projects.pgfoundry.org - however, is non-functional. The link above did not work for me, the below did: https://github.com/arkhipov/temporal_tables > > Am I correct in that I need to either find the client pgxn alternatively install the development environment and compilethe source code for this extension? Yes. > > Thank you. > > > -- Adrian Klaver adrian.klaver@aklaver.com
On November 27, 2023 6:58:40 PM GMT-05:00, Adrian Klaver <adrian.klaver@aklaver.com> wrote: >On 11/27/23 15:37, H wrote: >> Running Centos7 and PG13. I'd like to install the temporal_tables >extension but it does not seem to exist in postgresql13-contrib. > >If it is not here: > >https://www.postgresql.org/docs/13/contrib.html > >then it won't be in postgresql13-contrib. > >> >> I did find the source code at >https://github.com/arkhipov3/temporal_tables which suggests to use the >pgxn client to install it. The link to this client found on this page - >pgxnclient.projects.pgfoundry.org - however, is non-functional. > >The link above did not work for me, the below did: > >https://github.com/arkhipov/temporal_tables > >> >> Am I correct in that I need to either find the client pgxn >alternatively install the development environment and compile the >source code for this extension? > >Yes. > >> >> Thank you. >> >> >> The link to the pgxn client on the arkhipov's page leads to a non-functioning website: pgxnclient.projects.pgfoundry.org. Does anyone if the pgxn client can be found somewhere else?
On 11/27/23 16:18, H wrote: > On November 27, 2023 6:58:40 PM GMT-05:00, Adrian Klaver <adrian.klaver@aklaver.com> wrote: >>> >>> >>> > > The link to the pgxn client on the arkhipov's page leads to a non-functioning website: pgxnclient.projects.pgfoundry.org. > > Does anyone if the pgxn client can be found somewhere else? > https://pgxn.org/faq/ PGXN Client Is there a command-line client for installing extensions from PGXN? There is! Install it with this command: sudo easy_install pgxnclient Then you can install PGXN extensions with a simple command: pgxn install pair Run pgxn help to get a list of supported commands; or check out the introductory blog, the complete documentation or the source code. -- Adrian Klaver adrian.klaver@aklaver.com
On 11/27/23 16:18, H wrote: > The link to the pgxn client on the arkhipov's page leads to a non-functioning website: pgxnclient.projects.pgfoundry.org. > > Does anyone if the pgxn client can be found somewhere else? > Or: https://pgxn.github.io/pgxnclient/ -- Adrian Klaver adrian.klaver@aklaver.com
On 11/27/2023 07:26 PM, Adrian Klaver wrote: > On 11/27/23 16:18, H wrote: > >> The link to the pgxn client on the arkhipov's page leads to a non-functioning website: pgxnclient.projects.pgfoundry.org. >> >> Does anyone if the pgxn client can be found somewhere else? >> > > Or: > > https://pgxn.github.io/pgxnclient/ > Downloaded pgxn and first running: pgxn install temporal_tables but then running into another problem: GNUmakefile:25: /usr/pgsql-13/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory gmake: *** No rule to make target `/usr/pgsql-13/lib/pgxs/src/makefiles/pgxs.mk'. Stop. ERROR: command returned 2: gmake PG_CONFIG=/usr/pgsql-13/bin/pg_config all I have both make and gmake installed on the system but the issue seems to be that the file pgxs.mk does not exist? In fact,I can see that /usr/pgsql-13/lib/pgxs directory does not exist. Suggestions?
On 11/27/23 17:17, H wrote: > On 11/27/2023 07:26 PM, Adrian Klaver wrote: >> On 11/27/23 16:18, H wrote: >> >>> The link to the pgxn client on the arkhipov's page leads to a non-functioning website: pgxnclient.projects.pgfoundry.org. >>> >>> Does anyone if the pgxn client can be found somewhere else? >>> >> >> Or: >> >> https://pgxn.github.io/pgxnclient/ >> > Downloaded pgxn and first running: > > pgxn install temporal_tables > > but then running into another problem: > > GNUmakefile:25: /usr/pgsql-13/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory > gmake: *** No rule to make target `/usr/pgsql-13/lib/pgxs/src/makefiles/pgxs.mk'. Stop. > ERROR: command returned 2: gmake PG_CONFIG=/usr/pgsql-13/bin/pg_config all > > I have both make and gmake installed on the system but the issue seems to be that the file pgxs.mk does not exist? In fact,I can see that /usr/pgsql-13/lib/pgxs directory does not exist. > > Suggestions? What does running pg_config at the command line return? > > > -- Adrian Klaver adrian.klaver@aklaver.com
On 11/27/2023 08:38 PM, Adrian Klaver wrote: > On 11/27/23 17:17, H wrote: >> On 11/27/2023 07:26 PM, Adrian Klaver wrote: >>> On 11/27/23 16:18, H wrote: >>> >>>> The link to the pgxn client on the arkhipov's page leads to a non-functioning website: pgxnclient.projects.pgfoundry.org. >>>> >>>> Does anyone if the pgxn client can be found somewhere else? >>>> >>> >>> Or: >>> >>> https://pgxn.github.io/pgxnclient/ >>> >> Downloaded pgxn and first running: >> >> pgxn install temporal_tables >> >> but then running into another problem: >> >> GNUmakefile:25: /usr/pgsql-13/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory >> gmake: *** No rule to make target `/usr/pgsql-13/lib/pgxs/src/makefiles/pgxs.mk'. Stop. >> ERROR: command returned 2: gmake PG_CONFIG=/usr/pgsql-13/bin/pg_config all >> >> I have both make and gmake installed on the system but the issue seems to be that the file pgxs.mk does not exist? Infact, I can see that /usr/pgsql-13/lib/pgxs directory does not exist. >> >> Suggestions? > > What does running > > pg_config > > at the command line return? > >> >> >> > BINDIR = /usr/pgsql-13/bin DOCDIR = /usr/pgsql-13/doc HTMLDIR = /usr/pgsql-13/doc/html INCLUDEDIR = /usr/pgsql-13/include PKGINCLUDEDIR = /usr/pgsql-13/include INCLUDEDIR-SERVER = /usr/pgsql-13/include/server LIBDIR = /usr/pgsql-13/lib PKGLIBDIR = /usr/pgsql-13/lib LOCALEDIR = /usr/pgsql-13/share/locale MANDIR = /usr/pgsql-13/share/man SHAREDIR = /usr/pgsql-13/share SYSCONFDIR = /etc/sysconfig/pgsql PGXS = /usr/pgsql-13/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE = '--enable-rpath' '--prefix=/usr/pgsql-13' '--includedir=/usr/pgsql-13/include' '--mandir=/usr/pgsql-13/share/man''--datadir=/usr/pgsql-13/share' '--libdir=/usr/pgsql-13/lib' '--enable-tap-tests' '--with-icu''--with-llvm' '--with-perl' '--with-python' '--with-tcl' '--with-tclconfig=/usr/lib64' '--with-openssl' '--with-pam''--with-gssapi' '--with-includes=/usr/include' '--with-libraries=/usr/lib64' '--enable-nls' '--enable-dtrace''--with-uuid=e2fs' '--with-libxml' '--with-libxslt' '--with-ldap' '--with-selinux' '--with-systemd' '--with-system-tzdata=/usr/share/zoneinfo''--sysconfdir=/etc/sysconfig/pgsql' '--docdir=/usr/pgsql-13/doc' '--htmldir=/usr/pgsql-13/doc/html''CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,--as-needed' 'LLVM_CONFIG=/usr/lib64/llvm5.0/bin/llvm-config''CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' 'PYTHON=/usr/bin/python3' CC = gcc -std=gnu99 CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic CFLAGS_SL = -fPIC LDFLAGS = -Wl,--as-needed -L/usr/lib64/llvm5.0/lib -L/usr/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-13/lib',--enable-new-dtags LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgcommon -lpgport -lpthread -lselinux -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lrt -ldl-lm VERSION = PostgreSQL 13.13
On 11/27/23 17:41, H wrote: > On 11/27/2023 08:38 PM, Adrian Klaver wrote: >> On 11/27/23 17:17, H wrote: >>> I have both make and gmake installed on the system but the issue seems to be that the file pgxs.mk does not exist? Infact, I can see that /usr/pgsql-13/lib/pgxs directory does not exist. >>> >>> Suggestions? >> >> What does running >> >> pg_config >> >> at the command line return? >> >>> >>> >>> >> > BINDIR = /usr/pgsql-13/bin I don't use PGXN so I am flying blind here. You may need to do: sudo pgxn install temporal_tables -- Adrian Klaver adrian.klaver@aklaver.com
On November 27, 2023 8:48:35 PM GMT-05:00, Adrian Klaver <adrian.klaver@aklaver.com> wrote: >On 11/27/23 17:41, H wrote: >> On 11/27/2023 08:38 PM, Adrian Klaver wrote: >>> On 11/27/23 17:17, H wrote: > >>>> I have both make and gmake installed on the system but the issue >seems to be that the file pgxs.mk does not exist? In fact, I can see >that /usr/pgsql-13/lib/pgxs directory does not exist. >>>> >>>> Suggestions? >>> >>> What does running >>> >>> pg_config >>> >>> at the command line return? >>> >>>> >>>> >>>> >>> >> BINDIR = /usr/pgsql-13/bin > > >I don't use PGXN so I am flying blind here. You may need to do: > >sudo pgxn install temporal_tables I ran pgxn install temporal_tables as root so that should not be the problem.
On 11/27/23 18:18, H wrote: > On November 27, 2023 8:48:35 PM GMT-05:00, Adrian Klaver <adrian.klaver@aklaver.com> wrote: >> On 11/27/23 17:41, H wrote: >>> On 11/27/2023 08:38 PM, Adrian Klaver wrote: >>>> On 11/27/23 17:17, H wrote: >> I don't use PGXN so I am flying blind here. You may need to do: >> >> sudo pgxn install temporal_tables > > I ran pgxn install temporal_tables as root so that should not be the problem. > On an old machine running openSUSE I did: sudo pgxn install --pg_config=/usr/local/pgsql15/bin/pg_config temporal_tables Where this l /usr/local/pgsql15/lib64/pgxs/src/makefiles/pgxs.mk -rw-r--r-- 1 root root 14768 Sep 25 09:23 /usr/local/pgsql15/lib64/pgxs/src/makefiles/pgxs.mk was already installed. I presume as part of the source build I did for Postgres 15. Maybe the Centos packaging has a separate package you need to install to get the PGXS infrastructure? -- Adrian Klaver adrian.klaver@aklaver.com
On 11/28/2023 12:38 AM, Adrian Klaver wrote: > On 11/27/23 18:18, H wrote: >> On November 27, 2023 8:48:35 PM GMT-05:00, Adrian Klaver <adrian.klaver@aklaver.com> wrote: >>> On 11/27/23 17:41, H wrote: >>>> On 11/27/2023 08:38 PM, Adrian Klaver wrote: >>>>> On 11/27/23 17:17, H wrote: > >>> I don't use PGXN so I am flying blind here. You may need to do: >>> >>> sudo pgxn install temporal_tables >> >> I ran pgxn install temporal_tables as root so that should not be the problem. >> > > On an old machine running openSUSE I did: > > sudo pgxn install --pg_config=/usr/local/pgsql15/bin/pg_config temporal_tables > > > Where this > > l /usr/local/pgsql15/lib64/pgxs/src/makefiles/pgxs.mk > -rw-r--r-- 1 root root 14768 Sep 25 09:23 /usr/local/pgsql15/lib64/pgxs/src/makefiles/pgxs.mk > > was already installed. I presume as part of the source build I did for Postgres 15. > > Maybe the Centos packaging has a separate package you need to install to get the PGXS infrastructure? > > > > It took a little bit of work and required multiple steps since pgxs is part of the postgresql13-devel package. It also requiredupgrading LLVM and installing gcc. Note that I am running this particular postgresql13 installation in a docker container. With pgxs installed I could then proceed to install temporal_tables extension using pgxn. Thank you for pointing me in the right direction.