POSTGRESQL-ESSENTIALS practice question 6 of 15
You want to set the maximum time to complete client authentication to 10 seconds. Which parameter should you configure?
Full set: 71 questionsThe authenticationtimeout parameter is the specific server setting in PostgreSQL used to control the maximum time allowed for a client to complete the authentication process. The value is specified in seconds. Setting authenticationtimeout = 10s in the postgresql.conf file ensures that if a client does not successfully authenticate within 10 seconds of connecting, the server will close the connection. This prevents connections from lingering indefinitely in the authentication phase, which is a crucial security and resource management measure.
B. authtimeout is not a valid or recognized server configuration parameter in PostgreSQL.
C. clienttimeout is a deprecated alias for statementtimeout, which governs the maximum duration for any single SQL statement, not the authentication process.
D. connectiontimeout is a client-side connection string parameter used to set a timeout for establishing the initial network connection, not a server-side authentication setting.
1. PostgreSQL 16 Documentation, Chapter 20. Server Configuration, Section 20.4. Connection and Authentication:
Parameter: authenticationtimeout (integer)
Description: "Maximum time to complete client authentication, in seconds. If a client has not completed the authentication protocol in this much time, the server closes the connection. This prevents stuck clients from occupying a connection indefinitely. The default is one minute (1m)."
Source: PostgreSQL Documentation: Connection Settings
2. PostgreSQL 16 Documentation, Chapter 20. Server Configuration, Section 20.11. Client Connection Defaults:
Parameter: statementtimeout (integer)
Description: "Abort any statement that takes more than the specified amount of time... A value of zero (the default) turns this off. The clienttimeout setting is a deprecated alias for this." (This confirms option C is incorrect).
Source: PostgreSQL Documentation: Client Connection Defaults
3. PostgreSQL 16 Documentation, Chapter 34. libpq - C Library, Section 34.2. Database Connection Control Functions:
Parameter: connecttimeout
Description: "Maximum time to wait for connection, in seconds (write as a decimal integer string). Zero, negative, or not specified means wait indefinitely. The minimum timeout is 2 seconds. This timeout applies to each host name or IP address individually." (This confirms connectiontimeout is a client-side concept, referenced here as connecttimeout in libpq).
Source: PostgreSQL Documentation: libpq Connection Strings
Keep practicing
Take the free POSTGRESQL-ESSENTIALS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other POSTGRESQL-ESSENTIALS practice questions
- Question 1What is the purpose of the autovacuum parameter in PostgreSQL?
- Question 2Which psql meta-command is used to display all roles and their attributes?
- Question 3SERIAL and IDENTITY columns can be used to add an auto-incrementing column in a Postgres …
- Question 4You are connected to a PostgreSQL database. After executing a complex query an error mess…
- Question 5Which PostgreSQL configuration parameter controls the amount of memory used for sorting o…
- Question 7You need to configure your server to accept TCP/IP connections from specific IP addresses…
