Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wm9VQ-000cXN-15 for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Jul 2026 12:23:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wm9VP-007QEg-30 for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Jul 2026 12:23:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wm4B6-0069e8-06 for pgsql-bugs@lists.postgresql.org; Tue, 21 Jul 2026 06:42:07 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wm4B2-00000001EEj-3652 for pgsql-bugs@lists.postgresql.org; Tue, 21 Jul 2026 06:42:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=WYdDR5JIonSnnZN+hMEwWopFRHTurc/1X4NbQvbyG1E=; b=UuzOh+WoorM7XoeEqcbsxTOjkp +PsEGGK0RbqtzfRjIWYn7Snj+UTQ2QqkFITIrcLNOOkmXjcox2pKNGj8lROEpkNcKXtgw6MVUlRy+ L1cuxiqmZGED8pFd9f1Y2D3Y9jwmxvZefg48OC0nWQ/a1SdN56lGZ/Zb37b57eOIGBuZuUmqg/WXK 3CW1j/2bzKsVg+aLW7ah2W2P1Wrjc/r/VaGNBSG+NAk5nwM5y6LBSagL98BrBUURIy+TMTWgPy/b+ fnLjnjWTffun7euXX1YuOKMRZbs0UpHutd3bNEPyO0atQZkNgtp8rcc471S9t/90SLnwyLhZQL+yP fe/TPvPA==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wm4B2-001GoJ-2s for pgsql-bugs@lists.postgresql.org; Tue, 21 Jul 2026 06:42:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1wm4B1-00000000y7P-20FO for pgsql-bugs@lists.postgresql.org; Tue, 21 Jul 2026 06:42:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19562: pgcli packaged by the PostgreSQL Yum Repository:ModuleNotFoundError: No module named 'pgspecial' To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: pritt1999@gmail.com Reply-To: pritt1999@gmail.com, pgsql-bugs@lists.postgresql.org Date: Tue, 21 Jul 2026 06:41:32 +0000 Message-ID: <19562-9d41f689d05188c3@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19562 Logged by: Pritt Balagopal Email address: pritt1999@gmail.com PostgreSQL version: 18.4 Operating system: Fedora 44 Description: =20 This bug report does not apply to PostgreSQL 18.4, nor to pgcli either. Rather, it concerns the specific methodology by which pgcli is packaged for distribution within the PostgreSQL Yum Repository. How to reproduce the bug: Create the Fedora 44 container environment using Podman (Docker is also applicable here, the commands work the same way): ``` podman create -it --name fedora44 quay.io/fedora/fedora:44 /bin/bash ``` Run the Fedora 44 container environment, and enter its shell: ``` podman start -ai fedora44 ``` Within the shell, run a quick `dnf update` and then proceed to import the PostgreSQL yum repository as outlined in: https://www.postgresql.org/download/linux/redhat/ ``` dnf install https://download.postgresql.org/pub/repos/yum/reporpms/F-44-x86_64/pgdg-fed= ora-repo-latest.noarch.rpm ``` Now, install pgcli: ``` dnf install pgcli ``` You should see dnf prompting you for confirmation with the pgcli being sourced from `pgdg-common`. Accept and import GPG keys as prompted: ``` Package Arch Version Repository Size Installing: pgcli noarch 0:4.3.0-2PGDG.f44 pgdg-common 60.3 KiB Installing dependencies: expat x86_64 0:2.8.1-1.fc44 updates 327.4 KiB mpdecimal x86_64 0:4.0.1-3.fc44 fedora 217.1 KiB python-pip-wheel noarch 0:26.0.1-2.fc44 fedora 1.2 MiB python3 x86_64 0:3.14.6-1.fc44 updates 28.7 KiB python3-cli-helpers noarch 0:2.2.1-2.f44 pgdg-common 115.2 KiB python3-cli-helpers+styles noarch 0:2.2.1-2.f44 pgdg-common 0.0 B python3-click noarch 1:8.3.3-1.fc44 updates 1.2 MiB python3-configobj noarch 0:5.0.9-9.fc44 fedora 399.3 KiB python3-humanize noarch 0:4.15.0-2.fc44 fedora 231.5 KiB python3-jedi noarch 0:0.19.2-10.fc44 fedora 5.6 MiB python3-libs x86_64 0:3.14.6-1.fc44 updates 43.9 MiB python3-parso noarch 0:0.8.5-3.fc44 fedora 900.7 KiB python3-pgcli noarch 0:4.3.0-2PGDG.f44 pgdg-common 637.8 KiB python3-pygments noarch 0:2.19.1-9.fc44 fedora 11.3 MiB python3-setproctitle x86_64 0:1.3.7-4.fc44 fedora 41.7 KiB python3-sqlparse noarch 0:0.5.3-4.fc44 fedora 386.3 KiB python3-tabulate noarch 0:0.9.0-19.fc44 fedora 347.1 KiB python3-tabulate+widechars noarch 0:0.9.0-19.fc44 fedora 0.0 B python3-terminaltables noarch 0:3.1.10-20.fc44 fedora 94.7 KiB python3-wcwidth noarch 0:0.6.0-1.fc44 fedora 470.6 KiB Installing weak dependencies: python-unversioned-command noarch 0:3.14.6-1.fc44 updates ``` Once the installation is complete, invoke the `pgcli` executable and you will be met with an error: ``` Traceback (most recent call last): File "/usr/bin/pgcli", line 3, in from pgcli.main import cli File "/usr/lib/python3.14/site-packages/pgcli/main.py", line 3, in from pgspecial.namedqueries import NamedQueries ModuleNotFoundError: No module named 'pgspecial' ``` The fact that this module is not imported by default when `pgcli` is packaged for RPM is not the expected behavior. However, even if one were to bypass this limitation by manually installing the `pgspecial` python module via: ``` dnf install python3-pgspecial ``` This still does not solve the problem of using `pgcli` as packaged by the PostgreSQL Yum repository: ``` Traceback (most recent call last): File "/usr/bin/pgcli", line 3, in from pgcli.main import cli File "/usr/lib/python3.14/site-packages/pgcli/main.py", line 23, in from cli_helpers.tabular_output.preprocessors import ( ...<3 lines>... ) ImportError: cannot import name 'format_timestamps' from 'cli_helpers.tabular_output.preprocessors' (/usr/lib/python3.14/site-packages/cli_helpers/tabular_output/preprocessors= .py) ``` Note. This is NOT a bug within `pgcli` itself. Rather, this is a bug in the packaging of `pgcli` within the PostgreSQL Yum repository. We can verify this by installing `pgcli` from Fedora official repositories instead of `pgdg-common`. To do this, delete the previous container and begin anew. This time, do not import the PostgreSQL Yum Repository: ``` dnf install pgcli ``` ``` Package Arch Version Repository Size Installing: pgcli noarch 0:4.5.0-1.fc44 updates 649.9 KiB Installing dependencies: expat x86_64 0:2.8.1-1.fc44 updates 327.4 KiB libpq x86_64 0:18.0-4.fc44 fedora 1.0 MiB mpdecimal x86_64 0:4.0.1-3.fc44 fedora 217.1 KiB python-pip-wheel noarch 0:26.0.1-2.fc44 fedora 1.2 MiB python3 x86_64 0:3.14.6-1.fc44 updates 28.7 KiB python3-cli-helpers noarch 0:2.10.1-1.fc44 fedora 129.6 KiB python3-cli-helpers+styles noarch 0:2.10.1-1.fc44 fedora 0.0 B python3-click noarch 1:8.3.3-1.fc44 updates 1.2 MiB python3-configobj noarch 0:5.0.9-9.fc44 fedora 399.3 KiB python3-libs x86_64 0:3.14.6-1.fc44 updates 43.9 MiB python3-pgspecial noarch 0:2.2.1-7.fc44 fedora 363.8 KiB python3-prompt-toolkit noarch 0:3.0.52-2.fc44 fedora 4.2 MiB python3-psycopg3 noarch 0:3.3.4-1.fc44 updates 2.0 MiB python3-pygments noarch 0:2.19.1-9.fc44 fedora 11.3 MiB python3-setproctitle x86_64 0:1.3.7-4.fc44 fedora 41.7 KiB python3-sqlparse noarch 0:0.5.3-4.fc44 fedora 386.3 KiB python3-tabulate noarch 0:0.9.0-19.fc44 fedora 347.1 KiB python3-tabulate+widechars noarch 0:0.9.0-19.fc44 fedora 0.0 B python3-terminaltables noarch 0:3.1.10-20.fc44 fedora 94.7 KiB python3-tzlocal noarch 0:5.3.1-6.fc44 fedora 125.3 KiB python3-wcwidth noarch 0:0.6.0-1.fc44 fedora 470.6 KiB Installing weak dependencies: python-unversioned-command noarch 0:3.14.6-1.fc44 updates ``` Once the installation of pgcli from Fedora packaging has completed, invoking the command `pgcli` shows the expected response: ``` connection is bad: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket? ```