I installed and configured pgbouncer, but when I enter the psql command, a segmentation fault error occurs.
[postgres@test:/pgdata/pg-15/data]$ psql -U [myusername] -h localhost -d pgbouncer -p 6432
Password for user [myusername]:
Segmentation fault (core dumped)
I can’t get any specific hints from the pgbouncer.log
either.
2024-06-25 16:44:01.642 KST [36557] LOG C-0xb6b740: pgbouncer/postgres@[::1]:42698 login attempt: db=pgbouncer user=[username] tls=no
2024-06-25 16:44:02.805 KST [36557] LOG C-0xb6b740: pgbouncer/postgres@[::1]:37478 login attempt: db=pgbouncer user=[username] tls=no
2024-06-25 16:44:02.895 KST [36557] LOG C-0xb6b740: pgbouncer/postgres@[::1]:37478 closing because: client unexpected eof (age=0s)
the pgbouncer.ini configuration is as follows:
[postgres@test:/pgdata/pg-15/data]$ grep -v ";" pgbouncer.ini | tr -d "n"
[databases]
postgres = host=localhost port=5333 dbname=postgres
[users]
[pgbouncer]
logfile = /pgdata/pg-15/data/pgbouncer.log
pidfile = /tmp/pgbouncer.pid
listen_addr = *
listen_port = 6432
unix_socket_dir = /tmp
auth_type = scram-sha-256
auth_file = /etc/pgbouncer/userlist.txt
admin_users = [myusername]
so_reuseport = 1
and the userlist.txt is in the format “[myusername]” “SCRAM-SHA-256$ …”, and this password is the same as the value in pg_authid.rolpassword
.
Could it be that I have misunderstood the concept or operation of pgbouncer, or is there something additional that needs to be done? I would appreciate any help.