PostgreSQL
TMA-POSTGRES-7.1
Ensure a replication-only user is created and used for streaming replication
Trung bìnhCấp 1Xem xét thủ côngpostgres
Mô tả
Create a new user specifically for use by streaming replication instead of using the superuser account.
Cách kiểm tra
Phương pháp kiểm tra: Xem xét thủ công
Khuyến nghị này không thể kiểm tra tự động. Lần quét sẽ liệt kê mục này kèm hướng dẫn khi bạn truyền cờ --include-manual.
Run SELECT rolname FROM pg_roles WHERE rolreplication IS TRUE; Streaming replication must use a dedicated, non-superuser role with only the REPLICATION attribute; replication via postgres or another superuser is a fail.
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
CREATE ROLE replication_user WITH LOGIN REPLICATION PASSWORD '<pw>'; and add a 'hostssl replication replication_user <standby_ip>/32 scram-sha-256' line to pg_hba.conf, then reload.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- postgresdatabasereplicationmanual
- Tham chiếu
- CIS PostgreSQL 18 Benchmark v1.0.0 - 7.1 Ensure a replication-only user is created and used for streaming replication