Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
2135 views
How to configure Postgres on Amazon Linux
Most tutorials were installing both postgresql and postgresql-server: ``` $ sudo yum install postgresql postgresql-server Installed: postgresql.x86_64 0:9.2.24-1.amzn2.0.1 postgresql-server.x86_64 0:9.2.24-1.amzn2.0.1 Dependency Installed: postgresql-libs.x86_64 0:9.2.24-1.amzn2.0.1 ``` The programs...
Most tutorials were installing both postgresql and postgresql-server:
$ sudo yum install postgresql postgresql-server

Installed:
  postgresql.x86_64 0:9.2.24-1.amzn2.0.1                         
  postgresql-server.x86_64 0:9.2.24-1.amzn2.0.1                        

Dependency Installed:
  postgresql-libs.x86_64 0:9.2.24-1.amzn2.0.1
The programs are installed here:
$ which psql
/usr/bin/psql


$ which postgres
/usr/bin/postgres
At this point, most tutorials go into initdb and pg_ctl start
$ cd '/usr/lib'

$ service postgresql initdb
Hint: the preferred way to do this is now "postgresql-setup initdb"

$ sudo postgresql-setup initdb
[sudo] password for CORP\layne.sadler: 
Initializing database ... OK


$ systemctl enable postgresql
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql.service to usr/lib/systemd/system/postgresql.service.



$ systemctl start postgresql
[18:47:32]  /usr/bin ☯  systemctl status postgresql
● postgresql.service - PostgreSQL database server
   Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2020-03-05 18:47:32 EST; 7s ago
  Process: 25559 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT} -w -t 300 (code=exited, status=0/SUCCESS)
  Process: 25553 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
 Main PID: 25562 (postgres)
   CGroup: /system.slice/postgresql.service
           ├─25562 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432
           ├─25564 postgres: logger process   
           ├─25566 postgres: checkpointer process   
           ├─25567 postgres: writer process   
           ├─25568 postgres: wal writer process   
           ├─25569 postgres: autovacuum launcher process   
           └─25570 postgres: stats collector process

$ passwd postgres
note: /usr/bin/postgres -D /var/lib/pgsql/data -p 5432 **STUCK**
$postgres
postgres does not know where to find the server configuration file.
You must specify the --config-file or -D invocation option or set the PGDATA environment variable.

$ psql
psql: FATAL:  role "CORP\layne.sadler" does not exist

$ sudo pg_ctl -D postgresql-setup initdb
pg_ctl: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.

# can't seem to login as su despite other sudo commands working
Notes: - The OS claims to be rhel fedora centos but doesn't have the rhel-release libraries. - It seems like epel-release and dnf are blocked from install. - ^^^ postgres installation instructions want the above tools.
LayneSadler (148 rep)
Mar 5, 2020, 11:28 PM • Last activity: Jul 28, 2025, 05:04 PM
1 votes
2 answers
4532 views
pgbouncer startup problem
I followed the steps from http://www.guguncube.com/1692/pgbouncer-installation-and-configuration-in-ubuntu for pgbouncer setup. When I start pgbouncer, I get the error Cannot open logfile: 'pgbouncer.log': Permission denied Debug transcript: rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ pgbouncer -d -...
I followed the steps from http://www.guguncube.com/1692/pgbouncer-installation-and-configuration-in-ubuntu for pgbouncer setup. When I start pgbouncer, I get the error Cannot open logfile: 'pgbouncer.log': Permission denied Debug transcript: rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ pgbouncer -d -v pgbouncer.ini 2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [databases] 2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' 2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' ok:1 2014-12-29 15:39:31.045 18299 DEBUG parse_ini_file: [pgbouncer] 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433' 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost' 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any' 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1 2014-12-29 15:39:31.046 18299 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log' 2014-12-29 15:39:31.046 18299 **FATAL Cannot open logfile: 'pgbouncer.log': Permission denied** When I start pgbouncer with sudo I got the error @src/main.c:736 in function main(): PgBouncer should not run as root". Debug transcript: rajavelu-1469@rajavelu-1469:/etc/pgbouncer$ sudo pgbouncer -d -v pgbouncer.ini 2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [databases] 2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' 2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: '*' = 'host=localhost port=5432 user=$USER' ok:1 2014-12-29 15:39:54.861 18302 DEBUG parse_ini_file: [pgbouncer] 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433' 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_port' = '5433' ok:1 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost' 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'listen_addr' = 'localhost' ok:1 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any' 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'auth_type' = 'any' ok:1 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log' 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'logfile' = 'pgbouncer.log' ok:1 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid' 2014-12-29 15:39:54.862 18302 DEBUG parse_ini_file: 'pidfile' = 'pgbouncer.pid' ok:1 2014-12-29 15:39:54.862 18302 **FATAL @src/main.c:736 in function main(): PgBouncer should not run as root** My pgbouncer.ini file is: [databases] * = host=localhost port=5432 user=$USER [pgbouncer] listen_port = 5433 listen_addr = localhost auth_type = any logfile = pgbouncer.log pidfile = pgbouncer.pid
Raja (11 rep)
Dec 29, 2014, 10:13 AM • Last activity: Jul 16, 2025, 03:04 AM
0 votes
1 answers
2938 views
How to use archive_command to send archives to remote server (postgres)
Im looking into continuous archiving. I have a running test but the archives are getting saved to the master I want to send them to different machine. my command: archive_command: 'cp %p /var/lib/postgresql/9.5/archive/%f'
Im looking into continuous archiving. I have a running test but the archives are getting saved to the master I want to send them to different machine. my command: archive_command: 'cp %p /var/lib/postgresql/9.5/archive/%f'
Irishguy17 (11 rep)
Oct 18, 2018, 12:44 PM • Last activity: Jul 5, 2025, 10:06 AM
0 votes
0 answers
35 views
can't install pgAdmin4 desktop on arch linux
I need your help! I'm trying to install ```pgAdmin4``` desktop version on my Arch system. I am getting ```libfakeroot internal error: payload not recognized!``` while building package for ```pgadmin4-server```(which is required by pgadmin4-desktop) using ```makepkg -si``` command. Also, I've tried t...
I need your help! I'm trying to install
desktop version on my Arch system. I am getting
internal error: payload not recognized!
while building package for
-server
(which is required by pgadmin4-desktop) using
-si
command. Also, I've tried to install pgadmin4 using these 2 commands:
clone https://aur.archlinux.org/pgadmin4-py.git 
, and
pgadmin4-py/ && makepkg -si --noconfirm
, but continue to get the same error. I can't finish compiling, because this error appears and compiling process goes into a loop of these errors and I need to stop it myself by pressing
+
. I don't understand where is the problem. Would be grateful for your help.
Alex (3 rep)
Jun 18, 2025, 07:29 AM
2 votes
1 answers
50 views
systemd-tmpfiles doesn't create /run/postgresql at reboot, but does when called manually with --create
I have a problem related to a few already answered here in the past, but the solutions offered for them already appear to be in place for me: - [/var/run/postgresql missing after reboot](https://serverfault.com/questions/766287/) - [Tired of creating /run/postgresql and setting read and execute writ...
I have a problem related to a few already answered here in the past, but the solutions offered for them already appear to be in place for me: - [/var/run/postgresql missing after reboot](https://serverfault.com/questions/766287/) - [Tired of creating /run/postgresql and setting read and execute writes after every reboot](https://stackoverflow.com/questions/41515640/) - [Postgresql failed to start. Reboot is resetting the permission given to /var/run/postgresql/](https://stackoverflow.com/questions/58850796/) For me, I have postgresql running on my cluster(s), but it doesn't automatically start back up when the cluster is rebooted (which happens periodically for automated security patching). The problem is that /run/postgresql isn't created after reboot. However, the config to do so appears to already be in place and correct:
# cat /usr/lib/tmpfiles.d/postgresql-16.conf
d /run/postgresql 0755 postgres postgres -
I've tried rebooting a cluster and verified that the directory isn't created - but then if I run systemd-tmpfiles --create manually, it *does* get created and I'm able to start postgresql and proceed as normal. Everything else in /run seems to be getting created correctly - it's specifically postgresql that has a problem. Looking at the systemd-tmpfiles status:
# service  systemd-tmpfiles-setup status
Redirecting to /bin/systemctl status systemd-tmpfiles-setup.service
● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
...
Jun 16 05:59:21 ...hostname... systemd: Starting Create Volatile Files and Directories...
Jun 16 05:59:21 ...hostname... systemd-tmpfiles: [/usr/lib/tmpfiles.d/httpd.conf:1] Unknown group 'apache'.
Jun 16 05:59:21 ...hostname... systemd-tmpfiles: [/usr/lib/tmpfiles.d/httpd.conf:2] Unknown user 'apache'.
Jun 16 05:59:21 ...hostname... systemd-tmpfiles: [/usr/lib/tmpfiles.d/postgresql-16.conf:1] Unknown user 'postgres'.
Jun 16 05:59:21 ...hostname... systemd: Started Create Volatile Files and Directories.
So it looks like the issue is that some users (coming from a Red Hat Identity Management server) aren't available at the time the /run dir is initially created. I'm not sure how to manipulate the timing for this... I'm using RHEL 8.10 and postgres16 - but I've seen similar issues with RHEL9 and postgres12 as well. Everything is coming from yum so the packages, configs, etc. should be "vanilla".
Amanadiel (123 rep)
Jun 16, 2025, 02:31 PM • Last activity: Jun 16, 2025, 03:13 PM
110 votes
5 answers
263619 views
Install PostgreSQL client (psql) only on CentOS
Simple question, but no resources found about this. Is there any way to install only a PostgreSQL client, the terminal-based one, `psql`, on a CentOS7 system, without installing the complete PostgreSQL server? There is no dedicated `postgresql-client` or `postgresql94-client` or anything similar on...
Simple question, but no resources found about this. Is there any way to install only a PostgreSQL client, the terminal-based one, psql, on a CentOS7 system, without installing the complete PostgreSQL server? There is no dedicated postgresql-client or postgresql94-client or anything similar on the repositories.
Aleksandar Stojadinovic (1235 rep)
Dec 15, 2015, 01:44 PM • Last activity: Jun 11, 2025, 04:31 AM
0 votes
1 answers
4287 views
Not able to install PostgreSQL 9.6 on RHEL7.0
While i am intalling postgresql repo,i am facing the below.i tried with dowload and install but no luck.please give any suggestions. ``` yum install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm Loaded plugins: langpacks, product-id Cannot open...
While i am intalling postgresql repo,i am facing the below.i tried with dowload and install but no luck.please give any suggestions.
yum install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm 
Loaded plugins: langpacks, product-id
Cannot open: https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm . Skipping.
Error: Nothing to do


OS version:

      Chassis: desktop
        Machine ID: 7ccded75cb2544e8ad10a4232b335eeb
           Boot ID: b2f5934d56a54b728467bfd461cb0f90
    Virtualization: microsoft
  Operating System: Red Hat Enterprise Linux Server 7.0 (Maipo)
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.0:GA:server
            Kernel: Linux 3.10.0-123.el7.x86_64
      Architecture: x86_64
remo (1 rep)
Nov 14, 2020, 12:14 PM • Last activity: May 15, 2025, 09:02 PM
0 votes
0 answers
39 views
Manually Installing PostgreSQL from Packages
I'm in the process of bringing my server to life. I have already installed Proxmox onto it and now I'm in the bootstrapping stage whereby I'm planning to manually install a minimum number of VMs to get a minimal amount of services going to be able to access the internet and start using IaC. Problem...
I'm in the process of bringing my server to life. I have already installed Proxmox onto it and now I'm in the bootstrapping stage whereby I'm planning to manually install a minimum number of VMs to get a minimal amount of services going to be able to access the internet and start using IaC. Problem is, one of the services is a PostgreSQL database. I ran: apt-cache rdepends postgresql This resulted in dozens of dependencies. Not something I want to do manually. Or should I bite the bullet and have at it? Is installing a bunch of packages frowned upon? Just to elaborate, my server at the moment, doesn't have internet access. So I was planning on doing offline installs of the minimum set of VMs with PostgreSQL being on one of these VMs.
Xoteric (1 rep)
May 15, 2025, 11:22 AM • Last activity: May 15, 2025, 11:48 AM
0 votes
1 answers
42 views
ldd /usr/bin/pg_restore gives error not a dynamic executable
I am trying to determine the libraries needed for `pg_restore` in the official `postgres:15` docker image, but when I run `ldd /usr/bin/pg_restore` inside the container it returns this error: `not a dynamic executable`. When I install the same postgres client version 15.12 directly in my VM, `ldd` w...
I am trying to determine the libraries needed for pg_restore in the official postgres:15 docker image, but when I run ldd /usr/bin/pg_restore inside the container it returns this error: not a dynamic executable. When I install the same postgres client version 15.12 directly in my VM, ldd works as expected. What could be wrong that ldd is not working properly on a docker container?
Ricardo Silva (103 rep)
May 6, 2025, 09:52 AM • Last activity: May 6, 2025, 10:04 AM
0 votes
1 answers
2348 views
ufw won't allow connections to postgres port 5432
With `ufw disable` on remote postgres system i'm able to connect from my local system However, the connection does not work when I `ufw enable` as shown below: C:\Users\HOME>telnet 80.240.24.195 5432 Connecting To 80.240.24.195...Could not open connection to the host, on port 5432: Connect failed Be...
With ufw disable on remote postgres system i'm able to connect from my local system However, the connection does not work when I ufw enable as shown below: C:\Users\HOME>telnet 80.240.24.195 5432 Connecting To 80.240.24.195...Could not open connection to the host, on port 5432: Connect failed Below is my postgres configuration at the time of restart. cat /etc/postgresql/12/main/postgresql.conf # - Connection Settings - listen_addresses = '*' # what IP address(es) to listen on; # comma-separated list of addresses; # defaults to 'localhost'; use '*' for all # (change requires restart) port = 5432 # (change requires restart) max_connections = 100 # (change requires restart) #superuser_reserved_connections = 3 # (change requires restart) unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories cat /etc/postgresql/12/main/pg_hba.conf # Database administrative login by Unix domain socket local all postgres peer # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all peer # IPv4 local connections: host all all 127.0.0.1/32 md5 host all all 0.0.0.0/0 md5 # IPv6 local connections: host all all ::1/128 md5 telnet works when tried from the postgres host itself, but then I try to make the connection from my local laptop it fails. root@DKERP:/# ufw status numbered Status: active To Action From -- ------ ---- [ 1] 22 ALLOW IN Anywhere [ 2] 8069 ALLOW IN Anywhere [ 3] 443/tcp DENY IN Anywhere [ 4] 443 DENY IN Anywhere [ 5] 80/tcp DENY IN Anywhere [ 6] 80,443,5432/tcp DENY IN Anywhere [ 7] 80 DENY IN Anywhere [ 8] 4433/tcp DENY IN Anywhere [ 9] 5432/tcp ALLOW IN Anywhere 22 (v6) ALLOW IN Anywhere (v6) 8069 (v6) ALLOW IN Anywhere (v6) 443/tcp (v6) DENY IN Anywhere (v6) 443 (v6) DENY IN Anywhere (v6) 80/tcp (v6) DENY IN Anywhere (v6) 80,443,5432/tcp (v6) DENY IN Anywhere (v6) 80 (v6) DENY IN Anywhere (v6) 4433/tcp (v6) DENY IN Anywhere (v6) 5432/tcp (v6) ALLOW IN Anywhere (v6) Can you please suggest what needs to be further done to get the postgres to connect to work from my local laptop?
Ashar (527 rep)
Jan 9, 2022, 02:43 PM • Last activity: May 5, 2025, 02:00 PM
1 votes
1 answers
39 views
How to replace source list in old postgres:9 image before effectively run apt-get update
I would like to install java in final dockerfile stage from `postgres:9`, and I have to change following outdated addresses: ``` RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list RUN sed -i s/apt.postgresql.org/apt-archive.postgresql.org/g /etc/apt/sources.list RUN sed -i s/secu...
I would like to install java in final dockerfile stage from postgres:9, and I have to change following outdated addresses:
RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
RUN sed -i s/apt.postgresql.org/apt-archive.postgresql.org/g /etc/apt/sources.list
RUN sed -i s/security.debian.org/archive.debian.org/g /etc/apt/sources.list
RUN sed -i s/stretch-updates/stretch/g /etc/apt/sources.list
RUN sed -i s/stretch-updates/stretch/g /etc/apt/sources.list
but after command RUN apt-get update && apt-get install -y openjdk-8-jre-headless && apt-get clean update command inside docker is still looking for http://apt.postgresql.org/ ... ex. `Err:6 http://apt.postgresql.org/pub/repos/apt stretch-pgdg/main amd64 Packages 2.414 404 Not Found [IP: 87.238.57.227 80]` where can I find the http://apt.postgresql.org/pub/repos/apt resource to effectively replace?
Gromisław Sosenkowski (11 rep)
Apr 22, 2025, 05:07 PM • Last activity: Apr 22, 2025, 06:06 PM
0 votes
1 answers
2181 views
PostgreSQL Remote Connection debugging
I'm having issues connecting to my PostgreSQL database from an online source. PostgreSQL seems to be setup up fine it is running on it's default port 5432 and the postgresql.conf has the following line listen_addresses = '*' And the pg_hba.conf has the following host dbname usname all md5 I can conn...
I'm having issues connecting to my PostgreSQL database from an online source. PostgreSQL seems to be setup up fine it is running on it's default port 5432 and the postgresql.conf has the following line listen_addresses = '*' And the pg_hba.conf has the following host dbname usname all md5 I can connect to the PostgreSQL database from a different machine using the following credentials in pgadmin Name local Host 192.xx.xx.xx Port 5432 Maintenance DB dbname Username usname Password psword Using these I can connect perfectly it seems to work fine. Then I forwarded the port 192.xx.xx.xx:5432 on the ADSL router and checked it using the public IP address 197.xx.xx.xx (visible to the internet IP) http://www.canyouseeme.org/ Where I can see the port was forwarded ok. I've disabled SELinux and disabled the firewall temporarily as well. However when I try to connect using Name online Host 197.xx.xx.xx Port 5432 Maintenance DB dbname Username usname Password psword I get the server doesn't listen error message could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "197.xx.xx.xx" and accepting TCP/IP connections on port 5432? Why is this? Do I need to add an extra step to making it accept connections through port forwarding?
TheLovelySausage (4443 rep)
Nov 3, 2015, 02:53 PM • Last activity: Apr 20, 2025, 06:02 PM
0 votes
1 answers
482 views
How to install Postgresql17 to my EC2 instance on Amazon Linux
I'm trying to install postgres version 17 on my EC2 instance on Amazon Linux but I get this error: ``` [ec2-user@ip-172-31-8-1 ~]$ sudo dnf install -y postgresql17 postgresql17-server Last metadata expiration check: 1:30:57 ago on Tue Mar 18 13:55:34 2025. Error: Problem 1: conflicting requests - no...
I'm trying to install postgres version 17 on my EC2 instance on Amazon Linux but I get this error:
[ec2-user@ip-172-31-8-1 ~]$ sudo dnf install -y postgresql17 postgresql17-server
Last metadata expiration check: 1:30:57 ago on Tue Mar 18 13:55:34 2025.
Error:
 Problem 1: conflicting requests
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-server-17.0-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-server-17.0-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-server-17.0-2PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-server-17.0-2PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-server-17.1-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-server-17.1-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-server-17.2-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-server-17.2-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-server-17.3-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-server-17.3-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-server-17.4-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-server-17.4-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-server-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1()(64bit) needed by postgresql17-server-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicudata.so.60()(64bit) needed by postgresql17-server-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicui18n.so.60()(64bit) needed by postgresql17-server-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicuuc.so.60()(64bit) needed by postgresql17-server-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-server-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1()(64bit) needed by postgresql17-server-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicudata.so.60()(64bit) needed by postgresql17-server-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicui18n.so.60()(64bit) needed by postgresql17-server-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicuuc.so.60()(64bit) needed by postgresql17-server-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-server-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1()(64bit) needed by postgresql17-server-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicudata.so.60()(64bit) needed by postgresql17-server-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicui18n.so.60()(64bit) needed by postgresql17-server-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicuuc.so.60()(64bit) needed by postgresql17-server-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-server-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1()(64bit) needed by postgresql17-server-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicudata.so.60()(64bit) needed by postgresql17-server-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicui18n.so.60()(64bit) needed by postgresql17-server-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicuuc.so.60()(64bit) needed by postgresql17-server-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-server-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1()(64bit) needed by postgresql17-server-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicudata.so.60()(64bit) needed by postgresql17-server-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicui18n.so.60()(64bit) needed by postgresql17-server-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicuuc.so.60()(64bit) needed by postgresql17-server-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-server-17.4-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.4-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1()(64bit) needed by postgresql17-server-17.4-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-server-17.4-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.4-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicudata.so.60()(64bit) needed by postgresql17-server-17.4-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicui18n.so.60()(64bit) needed by postgresql17-server-17.4-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libicuuc.so.60()(64bit) needed by postgresql17-server-17.4-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libssl.so.1.1(OPENSSL_1_1_1)(64bit) needed by postgresql17-server-17.4-1PGDG.rhel8.x86_64 from pgdg17
 Problem 2: conflicting requests
 - package postgresql17-17.0-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_ requires postgresql17-libs(x86-64) = 17.0-1PGDG.rhel9, but none of the providers can be installed
 - package postgresql17-17.0-2PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_ requires postgresql17-libs(x86-64) = 17.0-2PGDG.rhel9, but none of the providers can be installed
 - package postgresql17-17.1-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_ requires postgresql17-libs(x86-64) = 17.1-1PGDG.rhel9, but none of the providers can be installed
 - package postgresql17-17.2-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_ requires postgresql17-libs(x86-64) = 17.2-1PGDG.rhel9, but none of the providers can be installed
 - package postgresql17-17.3-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_ requires postgresql17-libs(x86-64) = 17.3-1PGDG.rhel9, but none of the providers can be installed
 - package postgresql17-17.4-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_ requires postgresql17-libs(x86-64) = 17.4-1PGDG.rhel9, but none of the providers can be installed
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-libs-17.0-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-libs-17.0-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-libs-17.0-2PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-libs-17.0-2PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-libs-17.1-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-libs-17.1-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-libs-17.2-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-libs-17.2-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-libs-17.3-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-libs-17.3-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2()(64bit) needed by postgresql17-libs-17.4-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libldap.so.2(OPENLDAP_2.200)(64bit) needed by postgresql17-libs-17.4-1PGDG.rhel9.x86_64 from download.postgresql.org_pub_repos_yum_17_redhat_rhel-9-x86_64_
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libreadline.so.7()(64bit) needed by postgresql17-17.0-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libreadline.so.7()(64bit) needed by postgresql17-17.0-2PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libreadline.so.7()(64bit) needed by postgresql17-17.1-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libreadline.so.7()(64bit) needed by postgresql17-17.2-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libreadline.so.7()(64bit) needed by postgresql17-17.3-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1()(64bit) needed by postgresql17-17.4-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) needed by postgresql17-17.4-1PGDG.rhel8.x86_64 from pgdg17
 - nothing provides libreadline.so.7()(64bit) needed by postgresql17-17.4-1PGDG.rhel8.x86_64 from pgdg17

(try to add '--skip-broken' to skip uninstallable packages)
sudo yum update tells me it's updated to the current version already. I tried sudo amazon-linux-extras list | grep postgresql but it gave me sudo: amazon-linux-extras: command not found
Samantha Chan
Mar 18, 2025, 03:29 PM • Last activity: Mar 23, 2025, 10:10 PM
7 votes
3 answers
13792 views
Upgrade your postgreSQL Database from 14 to 15 on Debian
I wonder how I can upgrade the data from an existing PostgreSQL 14 installation to 15. I automatically got PG 15 installed via apt, so I see # dpkg -l | grep ii | cut -d" " -f3 | grep postgresql-1 postgresql-14 postgresql-15 But the data is still all in PG 14. There are two services service postgres...
I wonder how I can upgrade the data from an existing PostgreSQL 14 installation to 15. I automatically got PG 15 installed via apt, so I see # dpkg -l | grep ii | cut -d" " -f3 | grep postgresql-1 postgresql-14 postgresql-15 But the data is still all in PG 14. There are two services service postgresql@14-main status and service postgresql@15-main status
rubo77 (30435 rep)
Feb 13, 2023, 06:20 AM • Last activity: Dec 22, 2024, 06:53 AM
0 votes
1 answers
667 views
system ID mismatch, node belongs to a different cluster
I have etcd cluster, and now trying to initialize patroni (on server A and server B), but whenever I try to do so I'm getting the error about cluster mismatch. Tried removing 'initialize' from etcd, tried completely clearing up etcd saved configuration, but none worked So if I will start patroni on...
I have etcd cluster, and now trying to initialize patroni (on server A and server B), but whenever I try to do so I'm getting the error about cluster mismatch. Tried removing 'initialize' from etcd, tried completely clearing up etcd saved configuration, but none worked So if I will start patroni on server A, it will successfully initialize, but if I will run it on server B, it will fail with that error. The first who initializes wins, I could say ___ Patroni on server A (B has the same but with different placement of addresses):
scope: postgres-cluster
name: vb-psql2
namespace: /service/

restapi:
  listen: 192.168.8.141:8008
  connect_address: 192.168.8.141:8008
  authentication:
    username: patroni
    password: '*'

etcd:
  hosts: 192.168.8.141:2379,192.168.8.164:2379

bootstrap:
  method: initdb
  dcs:
    ttl: 60
    loop_wait: 10
    retry_timeout: 27
    maximum_lag_on_failover: 2048576
    master_start_timeout: 300
    synchronous_mode: true
    synchronous_mode_strict: false
    synchronous_node_count: 1
    # standby_cluster:
      # host: 127.0.0.1
      # port: 1111
      # primary_slot_name: patroni
    postgresql:
      use_pg_rewind: false
      use_slots: true
      parameters:
        max_connections: 800
        superuser_reserved_connections: 5
        max_locks_per_transaction: 64
        max_prepared_transactions: 0
        huge_pages: try
        shared_buffers: 512MB
        work_mem: 128MB
        maintenance_work_mem: 256MB
        effective_cache_size: 4GB
        checkpoint_timeout: 15min
        checkpoint_completion_target: 0.9
        min_wal_size: 2GB
        max_wal_size: 4GB
        wal_buffers: 32MB
        default_statistics_target: 1000
        seq_page_cost: 1
        random_page_cost: 4
        effective_io_concurrency: 2
        synchronous_commit: on
        autovacuum: on
        autovacuum_max_workers: 5
        autovacuum_vacuum_scale_factor: 0.01
        autovacuum_analyze_scale_factor: 0.02
        autovacuum_vacuum_cost_limit: 200
        autovacuum_vacuum_cost_delay: 20
        autovacuum_naptime: 1s
        max_files_per_process: 4096
        archive_mode: on
        archive_timeout: 1800s
        archive_command: cd .
        wal_level: replica
        wal_keep_segments: 130
        max_wal_senders: 10
        max_replication_slots: 10
        hot_standby: on
        hot_standby_feedback: True
        wal_log_hints: on
        shared_preload_libraries: pg_stat_statements,auto_explain
        pg_stat_statements.max: 10000
        pg_stat_statements.track: all
        pg_stat_statements.save: off
        auto_explain.log_min_duration: 10s
        auto_explain.log_analyze: true
        auto_explain.log_buffers: true
        auto_explain.log_timing: false
        auto_explain.log_triggers: true
        auto_explain.log_verbose: true
        auto_explain.log_nested_statements: true
        track_io_timing: on
        log_lock_waits: on
        log_temp_files: 0
        track_activities: on
        track_counts: on
        track_functions: all
        log_checkpoints: on
        logging_collector: on
        log_statement: mod
        log_truncate_on_rotation: on
        log_rotation_age: 1d
        log_rotation_size: 0
        log_line_prefix: '%m [%p] %q%u@%d '
        log_filename: 'postgresql-%a.log'
        log_directory: /var/log/postgresql

  initdb:  # List options to be passed on to initdb
    - encoding: UTF8
    - data-checksums

  pg_hba:
    - host all all 0.0.0.0/0 md5
    - host replication replicator 127.0.0.1/32 md5
    - host replication replicator 10.0.2.0/24 md5

postgresql:
  listen: 192.168.8.141,127.0.0.1:5432
  connect_address: 192.168.8.141:5432
  use_unix_socket: true
  data_dir: /var/lib/postgresql/11/main
  bin_dir: /usr/lib/postgresql/11/bin
  config_dir: /etc/postgresql/11/main
  pgpass: /var/lib/postgresql/.pgpass_patroni
  authentication:
    replication:
      username: replicator
      password: ****
    superuser:
      username: postgres
      password: ****
  parameters:
    unix_socket_directories: /var/run/postgresql
    stats_temp_directory: /var/lib/pgsql_stats_tmp

  remove_data_directory_on_rewind_failure: false
  remove_data_directory_on_diverged_timelines: false

#  callbacks:
#    on_start:
#    on_stop:
#    on_restart:
#    on_reload:
#    on_role_change:

  create_replica_methods:
    - basebackup
  basebackup:
    max-rate: '100M'
    checkpoint: 'fast'

watchdog:
  mode: off  # Allowed values: off, automatic, required
  device: /dev/watchdog
  safety_margin: 5

tags:
  nofailover: false
  noloadbalance: false
  clonefrom: false
  nosync: false

  # specify a node to replicate from (cascading replication)
#  replicatefrom: (node name)
etcd:
ETCD_NAME="etcd2"
ETCD_LISTEN_CLIENT_URLS="http://192.168.8.141:2379,http://127.0.0.1:2379 "
ETCD_ADVERTISE_CLIENT_URLS="http://192.168.8.141:2379 "
ETCD_LISTEN_PEER_URLS="http://192.168.8.141:2380 "
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://192.168.8.141:2380 "
ETCD_INITIAL_CLUSTER_TOKEN="etcd-postgres-cluster"
ETCD_INITIAL_CLUSTER="etcd1=http://192.168.8.164:2380,etcd2=http://192.168.8.141:2380 "
ETCD_INITIAL_CLUSTER_STATE="new"
ETCD_DATA_DIR="/var/lib/etcd"
ETCD_ELECTION_TIMEOUT="10000"
ETCD_HEARTBEAT_INTERVAL="2000"
ETCD_INITIAL_ELECTION_TICK_ADVANCE="false"
ETCD_ENABLE_V2="true"
How can I fix this? I've faced this issue several times back then (couldn't fix)
Slen (1 rep)
Nov 22, 2024, 03:13 PM • Last activity: Nov 25, 2024, 08:30 AM
1 votes
1 answers
103 views
/proc/pid exists but does pid not found in ps
I am seeing a very odd behavior. ```/proc/1154/cmdline``` exists, and ```kill -0 1154``` succeeds, but ```ps -ef | grep 1154``` and ```ls /proc | grep 1154``` do not show anything. 1154 was a postgres process in the middle of shutdown (or the logs say but maybe they did not get flushed) when the vm...
I am seeing a very odd behavior.
/proc/1154/cmdline
exists, and
-0 1154
succeeds, but
-ef | grep 1154
and
/proc | grep 1154
do not show anything. 1154 was a postgres process in the middle of shutdown (or the logs say but maybe they did not get flushed) when the vm was restarted. How is this possible?
Hari Krishna S (13 rep)
Oct 17, 2024, 02:37 AM • Last activity: Oct 17, 2024, 03:23 AM
0 votes
1 answers
441 views
Cannot install postgres on Centos 7 as signature cannot be verified/gpg keys not imported
I am currently trying to access a postgres 12 RDS on a private VPC through an EC2 instance on the same VPC, and in order to do so I am trying to install postgres on this instance (which is a Centos 7 AlmaLinux instance). After the initial attempt, I read that there are EOL and depreciation issues re...
I am currently trying to access a postgres 12 RDS on a private VPC through an EC2 instance on the same VPC, and in order to do so I am trying to install postgres on this instance (which is a Centos 7 AlmaLinux instance). After the initial attempt, I read that there are EOL and depreciation issues related to postgres 12 on Centos 7, so I followed the guide related to installing older versions of postgres on Centos 7 from here: https://yum.postgresql.org/repopackages/#pgredhatoldrepos However every time I try to yum install sudo yum install postgresql12-server postgresql12 I get the error: https://yum-archive.postgresql.org/12/redhat/rhel-7-x86_64/repodata/repomd.xml : [Errno 14] HTTPS Error 403 - Forbidden And when I try to access the link manually, it seems there is an error at the site. Is there simply no way to install postgres 12 on Centos 7 now? Or are there alternative ways? Also every time I try to install any single package that isn't even related to postgres, I still get the error above unless I explicitly tell yum to disable the repo like below: --disablerepo=pgdg12-archive Is this related? I posted a similar question in stackoverflow before I was redirected here because it would be more appropriate here. Thank you for the help in advanced.
ArthurS (1 rep)
Aug 17, 2024, 01:38 AM • Last activity: Aug 17, 2024, 02:11 AM
0 votes
1 answers
221 views
An ALTER USER postgres PASSWORD 'postgres' fails when provisioning vagrant with Postgresql
I'm provisioning a vagrant box with Postgresql. It looks going well, but at the end, it cannot run an `ALTER USER postgres PASSWORD 'postgres';` for a `Permission denied`. Here's what I'm doing, and what I notice. ```ruby config.vm.provision "shell", privileged: true, path: "../common/150_Postgresql...
I'm provisioning a vagrant box with Postgresql. It looks going well, but at the end, it cannot run an ALTER USER postgres PASSWORD 'postgres'; for a Permission denied. Here's what I'm doing, and what I notice.
config.vm.provision "shell", privileged: true, 
   path: "../common/150_Postgresql-Postgis.sh", args: ["15", "3", "postgres"]
150_Postgresql-Postgis.sh:
sudo apt-get -y -qq install "postgresql-$1" "postgresql-client-$1" -o Dpkg::Progress-Fancy="0"
sudo apt-get -y -qq install "postgis" "postgresql-$1-postgis-$2" "postgresql-$1-postgis-$2-scripts" -o Dpkg::Progress-Fancy="0" -o Dpkg::Use-Pty="0"

POSTGRES_PORT="5432"
POSTGRES_PASSWORD=$3
sudo -u postgres psql -f common/155_CreatePassword.sql -v password="'$POSTGRES_PASSWORD'"
During it's installation, I see the following logs when the two apt-get are executed. It starts installing Postgresql 15 and its related Postgis,
default: Running provisioner: shell...
default: Running: /tmp/vagrant-shell20240716-1139149-5w52kg.sh
default: /tmp/vagrant-shell: line 1: w#!/bin/bash: No such file or directory
default: 150 : Installation de Postgresql 15 et Postgis 3
[...]
default: Preparing to unpack .../01-postgresql-client-common_261.pgdg120+1_all.deb ...
default: Unpacking postgresql-client-common (261.pgdg120+1) ...
[...]
default: Selecting previously unselected package postgresql-client-15.
default: Preparing to unpack .../09-postgresql-client-15_15.7-1.pgdg120+1_amd64.deb ...
default: Unpacking postgresql-client-15 (15.7-1.pgdg120+1) ...
default: Selecting previously unselected package postgresql-15.
default: Preparing to unpack .../10-postgresql-15_15.7-1.pgdg120+1_amd64.deb ...
[...]
default: Setting up postgresql-15 (15.7-1.pgdg120+1) ...
default: Creating new PostgreSQL cluster 15/main ...
default: /usr/lib/postgresql/15/bin/initdb -D /var/lib/postgresql/15/main --auth-local peer --auth-host scram-sha-256 --no-instructions
default: The files belonging to this database system will be owned by user "postgres".
default: This user must also own the server process.
[...]
default: fixing permissions on existing directory /var/lib/postgresql/15/main ... ok
default: creating subdirectories ... ok
[...]
default: Selecting previously unselected package postgis.
default: Preparing to unpack .../48-postgis_3.4.2+dfsg-1.pgdg120+1_amd64.deb ...
default: Unpacking postgis (3.4.2+dfsg-1.pgdg120+1) ...
default: Selecting previously unselected package postgis-doc.
default: Preparing to unpack .../49-postgis-doc_3.4.2+dfsg-1.pgdg120+1_all.deb ...
default: Unpacking postgis-doc (3.4.2+dfsg-1.pgdg120+1) ...
default: Selecting previously unselected package postgresql-15-postgis-3-scripts.
default: Preparing to unpack .../50-postgresql-15-postgis-3-scripts_3.4.2+dfsg-1.pgdg120+1_all.deb ...
default: Unpacking postgresql-15-postgis-3-scripts (3.4.2+dfsg-1.pgdg120+1) ...
default: Selecting previously unselected package postgresql-15-postgis-3.
default: Preparing to unpack .../51-postgresql-15-postgis-3_3.4.2+dfsg-1.pgdg120+1_amd64.deb ...
default: Unpacking postgresql-15-postgis-3 (3.4.2+dfsg-1.pgdg120+1) 
[...]
Then it immediately adds an installation of Postgresql 16.
default: Selecting previously unselected package postgresql-client-16.
default: Preparing to unpack .../52-postgresql-client-16_16.3-1.pgdg120+1_amd64.deb ...
default: Unpacking postgresql-client-16 (16.3-1.pgdg120+1) ...
default: Selecting previously unselected package postgresql-16.
default: Preparing to unpack .../53-postgresql-16_16.3-1.pgdg120+1_amd64.deb ...
default: Unpacking postgresql-16 (16.3-1.pgdg120+1) ...
default: Selecting previously unselected package postgresql-16-postgis-3-scripts.
default: Preparing to unpack .../54-postgresql-16-postgis-3-scripts_3.4.2+dfsg-
[...]
155_CreatePassword.sql:
sql ALTER USER postgres PASSWORD :password;
The vagrant box creation fails with:
log default: Building PostgreSQL dictionaries from installed myspell/hunspell packages... default: Removing obsolete dictionary files: default: Processing triggers for fontconfig (2.14.1-4) ... default: psql: error: common/155_CreatePassword.sql: Permission denied default: psql: error: connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "postgres" default: connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "postgres" The SSH command responded with a non-zero exit status. Vagrant ``` Is the sudo -u causing a problem, preventing the ALTER USER postgres PASSWORD :password; from being executed? Or is it its attempt to install two different versions of Postgresql at the same time?
Marc Le Bihan (2353 rep)
Jul 16, 2024, 03:51 AM • Last activity: Jul 16, 2024, 07:46 AM
-3 votes
1 answers
592 views
Issue with postgre database creation in Kali Linux
I just installed `postgresql` 16 on my Kali Linux. It's working perfectly but when I try to create a database (using the correct command line), it gives me this feedback : ``` postgres=# create database Danny; ERROR: template database "template1" has a collation version mismatch DETAIL: The template...
I just installed postgresql 16 on my Kali Linux. It's working perfectly but when I try to create a database (using the correct command line), it gives me this feedback :
postgres=# create database Danny;
ERROR:  template database "template1" has a collation version mismatch
DETAIL:  The template database was created using collation version 2.37, but the operating system provides version 2.38.
HINT:  Rebuild all objects in the template database that use the default collation and run ALTER DATABASE template1 REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
I want to know how to solve this error and continue with database creation in postgre. How can I rectify this problem?
Daniel NanaYaw Gyamfi (9 rep)
Jul 15, 2024, 10:01 AM • Last activity: Jul 16, 2024, 12:13 AM
0 votes
1 answers
162 views
Can't start new PostgreSQL installation on Bazzite
I've recently installed Bazzite (an atomic Fedora variant) and want to get PostgreSQL running so I can continue an online development course I'm taking. I opened BoxBuddy (a.k.a. Toolbox) and successfully installed `postgresql-server.x86_64` as well as `postgresql.x86_64`. I tried to run `pg_ctl sta...
I've recently installed Bazzite (an atomic Fedora variant) and want to get PostgreSQL running so I can continue an online development course I'm taking. I opened BoxBuddy (a.k.a. Toolbox) and successfully installed postgresql-server.x86_64 as well as postgresql.x86_64. I tried to run pg_ctl status, but got an error that PGDATA wasn't set. Fine, I set that to /etc/postgresql-setup/upgrade/postgresql.conf since the installation created that file. Now, the problem I get is pg_ctl: could not open PID file "/etc/postgresql-setup/upgrade/postgresql.conf/postmaster.pid": Not a directory. I do not have a postmaster.pid file, and in any case, postgresql.conf isn't a directory, so it couldn't contain a file itself. What has gone wrong here?
spartanhooah (103 rep)
May 29, 2024, 12:50 AM • Last activity: May 29, 2024, 05:18 AM
Showing page 1 of 20 total questions