In pgAdmin 4, when I try click on the PostgreSQL 14 server (or any other) I get an error message that I don't understand:
connection to server at "localhost" (::1), port 5432 failed: could not initiate
GSSAPI security context: The operation or option is not available: Credential
for asked mech-type mech not found in the credential handle connection to
server at "localhost" (::1), port 5432 failed: FATAL: role "postgres" does not
exist
The web site yields an installer for the Postgres app, which gives
Could not start PostgreSQL server. pg_ctl: Could not start server. Examine the log output.
The log output is:
2022-07-29 10:41:10.111 EDT [44185] LOG: starting PostgreSQL 14.4 on aarch64-apple-darwin20.6.0, compiled by Apple clang version 12.0.5 (clang-1205.0.22.9), 64-bit
2022-07-29 10:41:10.113 EDT [44185] LOG: listening on IPv6 address "::1", port 5432
2022-07-29 10:41:10.113 EDT [44185] LOG: listening on IPv4 address "127.0.0.1", port 5432
2022-07-29 10:41:10.114 EDT [44185] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2022-07-29 10:41:10.119 EDT [44186] LOG: database system was interrupted; last known up at 2022-06-01 12:45:50 EDT
2022-07-29 10:41:10.198 EDT [44186] LOG: invalid primary checkpoint record
2022-07-29 10:41:10.198 EDT [44186] PANIC: could not locate a valid checkpoint record
2022-07-29 10:41:10.198 EDT [44185] LOG: startup process (PID 44186) was terminated by signal 6: Abort trap: 6
2022-07-29 10:41:10.198 EDT [44185] LOG: aborting startup due to startup process failure
2022-07-29 10:41:10.199 EDT [44185] LOG: database system is shut down
I was experiencing the same issue and found the issue was the default "Username" when connecting the server in pgAdmin 4 needed to be updated to match the Superuser that was created when I had set up postgres. Run '\du' command in psql to get the Database Roles and confirm the "Role name" that was created for the Superuser. So for anyone else that is having trouble with this same issue I would recommend first trying this approach. under: Register - Server, update General tab > 'Name' = 'localhost', then update Connection tab > 'Host name' = 'localhost' , 'Username' = 'Match to your Database Role for SuperUser'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With