-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

PostgreSQL 16 Administration Cookbook
By :

This recipe is all about what you should do when things go wrong.
Bear in mind that 90% of problems are just misunderstandings, and you’ll quickly be on track again.
Here, we’ve made a checklist to be followed if a connection attempt fails:
pg_hba.conf rejects connection for host...
error message, it means that your connection attempt has been explicitly rejected by the database administrator for that server. You will not be able to connect from the current client system using those credentials. There is little point in attempting to contact the administrator, as you are violating an explicit security policy with what you are attempting to do.no pg_hba.conf entry for...
, it means there is no explicit rule that matches your credentials. This is likely an oversight on the part of the administrator and is common in very complex networks. Contact the administrator and request a ruling on whether your connection should be allowed (hopefully) or explicitly rejected in the future.psql
. If you’re trying to connect to PostgreSQL from anything other than the psql
command-line utility, switch to that now. If you can make psql
connect successfully but cannot make your main connection work correctly, the problem may be in the local interface you are using.pg_isready
utility, shipped with PostgreSQL. This tool checks the status of a database server, either local or remote, by establishing a minimal connection. Only the hostname and port are mandatory, which is great if you don’t know the database name, username, or password. The following outcomes are possible:hot_standby
parameter enabled, preventing you from connecting.listen_addresses
parameter. Check whether it is set to *
for remote connections and localhost
for local connections.log_connections = on
log_disconnections = on
Client authentication and security are the rapidly changing areas in subsequent major PostgreSQL releases. You will also find differences between maintenance release levels. The PostgreSQL documents on this topic can be viewed at http://www.postgresql.org/docs/current/interactive/client-authentication.html.
Always check which release level you are using before consulting the manual or asking for support. Many problems are caused simply by confusing the capabilities between release levels.
Change the font size
Change margin width
Change background colour