> 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/appendixes/contrib/auth-delay.md).

# F.2. auth\_delay — 驗證失敗時暫停 \#

[F.2.1. 設定參數](#AUTH-DELAY-CONFIGURATION-PARAMETERS)

[F.2.2. 作者](#AUTH-DELAY-AUTHOR)

`auth_delay` 會讓伺服器在回報驗證失敗前短暫暫停，使針對資料庫密碼的暴力破解攻擊較為困難。請注意，它無法防止阻斷服務攻擊，甚至可能使情況惡化，因為等待回報驗證失敗的程序仍會占用連線槽。

此模組必須透過 `postgresql.conf` 中的 [shared\_preload\_libraries](/server-administration/runtime-config/runtime-config-client.md#GUC-SHARED-PRELOAD-LIBRARIES) 載入，才能運作。

## F.2.1. 設定參數 [#](#AUTH-DELAY-CONFIGURATION-PARAMETERS)

`auth_delay.milliseconds` (`integer`): 回報驗證失敗前等待的毫秒數。預設值為 0。

這些參數必須在 `postgresql.conf` 中設定。典型的使用方式如下：

```

# postgresql.conf
shared_preload_libraries = 'auth_delay'

auth_delay.milliseconds = '500'
```

## F.2.2. 作者 [#](#AUTH-DELAY-AUTHOR)

KaiGai Kohei `<kaigai@ak.jp.nec.com>`

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/auth-delay.html)（原文版本：18.6；核對日期：2026-09-06）


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.postgresql.tw/appendixes/contrib/auth-delay.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
