A Rant on lock_timeout

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: ivaylo(dot)zlatanov(at)gmail(dot)com
Subject: A Rant on lock_timeout
Date: 2019-10-04 13:35:57
Message-ID: 157019615723.25307.15449102262106437404@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/runtime-config-client.html
Description:

Hello,

I was looking explicitly for information on the default value of
lock_timeout and what it does. I got this paragraph:

"Abort any statement that waits longer than the specified number of
milliseconds while attempting to acquire a lock on a table, index, row, or
other database object. The time limit applies separately to each lock
acquisition attempt. The limit applies both to explicit locking requests
(such as LOCK TABLE, or SELECT FOR UPDATE without NOWAIT) and to
implicitly-acquired locks. If log_min_error_statement is set to ERROR or
lower, the statement that timed out will be logged. A value of zero (the
default) turns this off."

Unfortunately, the crucial bit for me is in a sentence that hardly could be
any more obscure: `A value of zero (the default) turns this off.` Before
this sentence there are multiple statements; what exactly does `this` refers
to? Does a value of zero turns of logging of timed out statements mentioned
in the previous sentence? Would it be hard to put it like `A default value
of zero means a statement will wait indefinitely to acquire a lock`.
I believe the sole purpose of a technical document is to be precise. If I
had to suggest setting this parameter as a solution to a critical issue of
connections piling up waiting on locks and depleting connection pools, I can
never be confident knowing that the current default value turns something
off.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2019-10-04 21:57:46 Re: I'm surprised to see the word master here
Previous Message Michael Paquier 2019-10-03 01:41:54 Re: "DROP INDEX" correction