Skip to content

Unable to use on the self-compiled Postgres system #3

@xieydd

Description

@xieydd

I want to use pig to install extensions in my Postgres, which is self-compiled. But I am facing a problem, it seems that when checking the extension dependencies, it was found that the dependent Postgres does not exist and a new Postgres needs to be downloaded and started.

root@53280b19b85d:/# pig ext install pg_duckdb  -p /usr/lib/postgresql/16/bin/pg_config

INFO[05:21:58] installing extensions: apt-get install postgresql-16-pg-duckdb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  cron libcommon-sense-perl libio-pty-perl libipc-run-perl libjson-perl libjson-xs-perl libllvm15 libpopt0 libpq-dev libpq5
  libsensors-config libsensors5 libtypes-serialiser-perl logrotate netbase postgresql-16 postgresql-client-16
  postgresql-client-common postgresql-common ssl-cert sysstat
Suggested packages:
  anacron checksecurity default-mta | mail-transport-agent postgresql-doc-17 lm-sensors bsd-mailx | mailx postgresql-doc-16 isag
The following NEW packages will be installed:
  cron libcommon-sense-perl libio-pty-perl libipc-run-perl libjson-perl libjson-xs-perl libllvm15 libpopt0 libsensors-config
  libsensors5 libtypes-serialiser-perl logrotate netbase postgresql-16 postgresql-16-pg-duckdb postgresql-client-16
  postgresql-client-common postgresql-common ssl-cert sysstat
The following packages will be upgraded:
  libpq-dev libpq5
2 upgraded, 20 newly installed, 0 to remove and 21 not upgraded.
Need to get 58.6 MB of archives.
After this operation, 235 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://repo.pigsty.cc/apt/pgsql/jammy jammy/main amd64 postgresql-16-pg-duckdb amd64 0.2.0-1PIGSTY~jammy [11.4 MB]
Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 cron amd64 3.0pl1-137ubuntu3 [73.7 kB]
Get:3 https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/apt jammy-pgdg/main amd64 postgresql-client-common all 267.pgdg22.04+1 [95.1 kB]
Get:4 https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/apt jammy-pgdg/main amd64 postgresql-common all 267.pgdg22.04+1 [241 kB]
Get:5 https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/apt jammy-pgdg/main amd64 libpq-dev amd64 17.2-1.pgdg22.04+1 [146 kB]
Get:6 https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/apt jammy-pgdg/main amd64 libpq5 amd64 17.2-1.pgdg22.04+1 [223 kB]
Get:7 https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/apt jammy-pgdg/main amd64 postgresql-client-16 amd64 16.6-1.pgdg22.04+1 [1,891 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy/main amd64 libjson-perl all 4.04000-1 [81.8 kB]                           
Get:9 http://archive.ubuntu.com/ubuntu jammy/main amd64 libio-pty-perl amd64 1:1.15-2build2 [35.1 kB]                              
Get:10 http://archive.ubuntu.com/ubuntu jammy/main amd64 libipc-run-perl all 20200505.0-1 [89.8 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/main amd64 netbase all 6.3 [12.9 kB]      
Get:12 http://archive.ubuntu.com/ubuntu jammy/main amd64 ssl-cert all 1.1.2 [17.4 kB]
Get:13 https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/apt jammy-pgdg/main amd64 postgresql-16 amd64 16.6-1.pgdg22.04+1 [18.1 MB]
Get:14 http://archive.ubuntu.com/ubuntu jammy/main amd64 libpopt0 amd64 1.18-3build1 [28.2 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 logrotate amd64 3.19.0-1ubuntu1.1 [54.3 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy/main amd64 libcommon-sense-perl amd64 3.75-2build1 [21.1 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy/main amd64 libtypes-serialiser-perl all 1.01-1 [11.6 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy/main amd64 libjson-xs-perl amd64 4.030-1build3 [87.2 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libllvm15 amd64 1:15.0.7-0ubuntu0.22.04.3 [25.4 MB]
Get:20 http://archive.ubuntu.com/ubuntu jammy/main amd64 libsensors-config all 1:3.6.0-7ubuntu1 [5,274 B]
Get:21 http://archive.ubuntu.com/ubuntu jammy/main amd64 libsensors5 amd64 1:3.6.0-7ubuntu1 [26.3 kB]
Get:22 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 sysstat amd64 12.5.2-2ubuntu0.2 [487 kB]
Fetched 58.6 MB in 6s (9,649 kB/s)                                                                                                  
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package cron.
(Reading database ... 31940 files and directories currently installed.)
Preparing to unpack .../00-cron_3.0pl1-137ubuntu3_amd64.deb ...
Unpacking cron (3.0pl1-137ubuntu3) ...
Selecting previously unselected package libjson-perl.
Preparing to unpack .../01-libjson-perl_4.04000-1_all.deb ...
Unpacking libjson-perl (4.04000-1) ...
Selecting previously unselected package libio-pty-perl.
Preparing to unpack .../02-libio-pty-perl_1%3a1.15-2build2_amd64.deb ...
Unpacking libio-pty-perl (1:1.15-2build2) ...
Selecting previously unselected package libipc-run-perl.
Preparing to unpack .../03-libipc-run-perl_20200505.0-1_all.deb ...
Unpacking libipc-run-perl (20200505.0-1) ...
Selecting previously unselected package netbase.
Preparing to unpack .../04-netbase_6.3_all.deb ...
Unpacking netbase (6.3) ...
Selecting previously unselected package postgresql-client-common.
Preparing to unpack .../05-postgresql-client-common_267.pgdg22.04+1_all.deb ...
Unpacking postgresql-client-common (267.pgdg22.04+1) ...
Selecting previously unselected package ssl-cert.
Preparing to unpack .../06-ssl-cert_1.1.2_all.deb ...
Unpacking ssl-cert (1.1.2) ...
Selecting previously unselected package postgresql-common.
Preparing to unpack .../07-postgresql-common_267.pgdg22.04+1_all.deb ...
Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Unpacking postgresql-common (267.pgdg22.04+1) ...
Selecting previously unselected package libpopt0:amd64.
Preparing to unpack .../08-libpopt0_1.18-3build1_amd64.deb ...
Unpacking libpopt0:amd64 (1.18-3build1) ...
Selecting previously unselected package logrotate.
Preparing to unpack .../09-logrotate_3.19.0-1ubuntu1.1_amd64.deb ...
Unpacking logrotate (3.19.0-1ubuntu1.1) ...
Selecting previously unselected package libcommon-sense-perl:amd64.
Preparing to unpack .../10-libcommon-sense-perl_3.75-2build1_amd64.deb ...
Unpacking libcommon-sense-perl:amd64 (3.75-2build1) ...
Selecting previously unselected package libtypes-serialiser-perl.
Preparing to unpack .../11-libtypes-serialiser-perl_1.01-1_all.deb ...
Unpacking libtypes-serialiser-perl (1.01-1) ...
Selecting previously unselected package libjson-xs-perl.
Preparing to unpack .../12-libjson-xs-perl_4.030-1build3_amd64.deb ...
Unpacking libjson-xs-perl (4.030-1build3) ...
Selecting previously unselected package libllvm15:amd64.
Preparing to unpack .../13-libllvm15_1%3a15.0.7-0ubuntu0.22.04.3_amd64.deb ...
Unpacking libllvm15:amd64 (1:15.0.7-0ubuntu0.22.04.3) ...
Preparing to unpack .../14-libpq-dev_17.2-1.pgdg22.04+1_amd64.deb ...
Unpacking libpq-dev (17.2-1.pgdg22.04+1) over (14.13-0ubuntu0.22.04.1) ...
Preparing to unpack .../15-libpq5_17.2-1.pgdg22.04+1_amd64.deb ...
Unpacking libpq5:amd64 (17.2-1.pgdg22.04+1) over (14.13-0ubuntu0.22.04.1) ...
Selecting previously unselected package libsensors-config.
Preparing to unpack .../16-libsensors-config_1%3a3.6.0-7ubuntu1_all.deb ...
Unpacking libsensors-config (1:3.6.0-7ubuntu1) ...
Selecting previously unselected package libsensors5:amd64.
Preparing to unpack .../17-libsensors5_1%3a3.6.0-7ubuntu1_amd64.deb ...
Unpacking libsensors5:amd64 (1:3.6.0-7ubuntu1) ...
Selecting previously unselected package postgresql-client-16.
Preparing to unpack .../18-postgresql-client-16_16.6-1.pgdg22.04+1_amd64.deb ...
Unpacking postgresql-client-16 (16.6-1.pgdg22.04+1) ...
Selecting previously unselected package postgresql-16.
Preparing to unpack .../19-postgresql-16_16.6-1.pgdg22.04+1_amd64.deb ...
Unpacking postgresql-16 (16.6-1.pgdg22.04+1) ...
Selecting previously unselected package postgresql-16-pg-duckdb.
Preparing to unpack .../20-postgresql-16-pg-duckdb_0.2.0-1PIGSTY~jammy_amd64.deb ...
Unpacking postgresql-16-pg-duckdb (0.2.0-1PIGSTY~jammy) ...
Selecting previously unselected package sysstat.
Preparing to unpack .../21-sysstat_12.5.2-2ubuntu0.2_amd64.deb ...
Unpacking sysstat (12.5.2-2ubuntu0.2) ...
Setting up libio-pty-perl (1:1.15-2build2) ...
Setting up cron (3.0pl1-137ubuntu3) ...
Adding group `crontab' (GID 101) ...
Done.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libsensors-config (1:3.6.0-7ubuntu1) ...
Setting up libpq5:amd64 (17.2-1.pgdg22.04+1) ...
Setting up libcommon-sense-perl:amd64 (3.75-2build1) ...
Setting up libpq-dev (17.2-1.pgdg22.04+1) ...
Setting up ssl-cert (1.1.2) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
Setting up libipc-run-perl (20200505.0-1) ...
Setting up libsensors5:amd64 (1:3.6.0-7ubuntu1) ...
Setting up libtypes-serialiser-perl (1.01-1) ...
Setting up libllvm15:amd64 (1:15.0.7-0ubuntu0.22.04.3) ...
Setting up libjson-perl (4.04000-1) ...
Setting up netbase (6.3) ...
Setting up sysstat (12.5.2-2ubuntu0.2) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline

Creating config file /etc/default/sysstat with new version
update-alternatives: using /usr/bin/sar.sysstat to provide /usr/bin/sar (sar) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/sar.1.gz because associated file /usr/share/man/man1/sar.sysstat.1.gz (of link group sar) doesn't exist
Setting up libpopt0:amd64 (1.18-3build1) ...
Setting up logrotate (3.19.0-1ubuntu1.1) ...
Setting up postgresql-client-common (267.pgdg22.04+1) ...
Setting up libjson-xs-perl (4.030-1build3) ...
Setting up postgresql-client-16 (16.6-1.pgdg22.04+1) ...
update-alternatives: using /usr/share/postgresql/16/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode
Setting up postgresql-common (267.pgdg22.04+1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
Adding user postgres to group ssl-cert

Creating config file /etc/postgresql-common/createcluster.conf with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
'/etc/apt/trusted.gpg.d/apt.postgresql.org.gpg' -> '/usr/share/postgresql-common/pgdg/apt.postgresql.org.gpg'
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up postgresql-16 (16.6-1.pgdg22.04+1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)
debconf: falling back to frontend: Readline
Creating new PostgreSQL cluster 16/main ...
/usr/lib/postgresql/16/bin/initdb -D /var/lib/postgresql/16/main --auth-local peer --auth-host scram-sha-256 --no-instructions
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/16/main ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up postgresql-16-pg-duckdb (0.2.0-1PIGSTY~jammy) ...
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...

$ psql -h localhost -p 5438 -U postgres
Password for user postgres: 
psql (13.3 (Ubuntu 13.3-1.pgdg16.04+1), server 16.5)
WARNING: psql major version 13, server major version 16.
         Some psql features might not work.
Type "help" for help.

postgres=# CREATE EXTENSION pg_duckdb;
ERROR:  extension "pg_duckdb" is not available
DETAIL:  Could not open extension control file "/var/lib/postgresql/data/tensorchord/extension/pg_duckdb.control": No such file or directory.
HINT:  The extension must first be installed on the system where PostgreSQL is running.
postgres=# \q

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions