Where to start First steps track · 15 stages
Linux Labs

Web stack

Quiz: PostgreSQL

Question 1 of 10
Leave the quiz

At which stage a PostgreSQL connection stopped, which pg_hba.conf line decides a login and how to apply a rule without a restart; what a dump holds, why it is not restored into a working database and how to compare the copy. The questions follow the lessons “Connection, role and pg_hba” and “A dump and a verified restore”.

10 questions · threshold 70%

Read the output

The service is running and the port is listening, yet the application cannot log in. At which check did the connection stop?

$ ss -tln 'sport = :5432'
LISTEN 0      200        127.0.0.1:5432      0.0.0.0:*
$ psql -h 127.0.0.1 -U shop -d shop -c 'SELECT 1'
psql: error: connection to server at "127.0.0.1", port 5432 failed: FATAL:  no pg_hba.conf entry for host "127.0.0.1", user "shop", database "shop", no encryption
A–D or ↵ Sign in to answer
Loading…