Skip to content

Commit 694bbb9

Browse files
committed
nit
1 parent b2d41af commit 694bbb9

File tree

1 file changed

+5
-5
lines changed
  • docs/integrations/data-ingestion/clickpipes/postgres

1 file changed

+5
-5
lines changed

docs/integrations/data-ingestion/clickpipes/postgres/faq.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,23 +203,23 @@ For manually created publications, please add any tables you want to the publica
203203
If you're replicating from a Postgres read replica/hot standby, you will need to create your own publication on the primary instance, which will automatically propagate to the standby. The ClickPipe will not be able to manage the publication in this case as you're unable to create publications on a standby.
204204
:::
205205
206-
## Recommended `max_slot_wal_keep_size` settings {#recommended-max_slot_wal_keep_size-settings}
206+
### Recommended `max_slot_wal_keep_size` settings {#recommended-max_slot_wal_keep_size-settings}
207207
208208
- **At Minimum:** Set [`max_slot_wal_keep_size`](https://www.postgresql.org/docs/devel/runtime-config-replication.html#GUC-MAX-SLOT-WAL-KEEP-SIZE) to retain at least **two days' worth** of WAL data.
209209
- **For Large Databases (High Transaction Volume):** Retain at least **2-3 times** the peak WAL generation per day.
210210
- **For Storage-Constrained Environments:** Tune this conservatively to **avoid disk exhaustion** while ensuring replication stability.
211211

212-
### How to calculate the right value {#how-to-calculate-the-right-value}
212+
#### How to calculate the right value {#how-to-calculate-the-right-value}
213213

214214
To determine the right setting, measure the WAL generation rate:
215215

216-
#### For PostgreSQL 10+ {#for-postgresql-10}
216+
##### For PostgreSQL 10+ {#for-postgresql-10}
217217

218218
```sql
219219
SELECT pg_wal_lsn_diff(pg_current_wal_insert_lsn(), '0/0') / 1024 / 1024 AS wal_generated_mb;
220220
```
221221

222-
#### For PostgreSQL 9.6 and below: {#for-postgresql-96-and-below}
222+
##### For PostgreSQL 9.6 and below: {#for-postgresql-96-and-below}
223223

224224
```sql
225225
SELECT pg_xlog_location_diff(pg_current_xlog_insert_location(), '0/0') / 1024 / 1024 AS wal_generated_mb;
@@ -230,7 +230,7 @@ SELECT pg_xlog_location_diff(pg_current_xlog_insert_location(), '0/0') / 1024 /
230230
* Multiply that number by 2 or 3 to provide sufficient retention.
231231
* Set `max_slot_wal_keep_size` to the resulting value in MB or GB.
232232

233-
#### Example {#example}
233+
##### Example {#example}
234234

235235
If your database generates 100 GB of WAL per day, set:
236236

0 commit comments

Comments
 (0)