> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/14/appendixes/additional-supplied-modules/auth_delay.md).

# F.3. auth\_delay

auth\_delay 讓伺服器在回報身份驗證失敗之前會短暫暫停，從而使對資料庫密碼的暴力攻擊更加困難。請注意，它不會阻止拒絕服務攻擊，甚至可能加劇攻擊，因為在回報身份驗證失敗之前等待的程序仍然會佔用連線。

要使用這個功能，必須透過 postgresql.conf 中的 [shared\_preload\_libraries](/14/server-administration/server-configuration/client-connection-defaults.md#shared_preload_libraries-string) 載入此模組。

## F.3.1. Configuration Parameters

`auth_delay.milliseconds` (`int`)

The number of milliseconds to wait before reporting an authentication failure. The default is 0.

These parameters must be set in `postgresql.conf`. Typical usage might be:

```
# postgresql.conf
shared_preload_libraries = 'auth_delay'

auth_delay.milliseconds = '500'
```

## F.3.2. Author

KaiGai Kohei `<`[`kaigai@ak.jp.nec.com`](mailto:kaigai@ak.jp.nec.com)`>`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/14/appendixes/additional-supplied-modules/auth_delay.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
