跳至內容

AWS Posgres RDS disk space consumption in idle database when using logical replication

0

When logical replication is enabled in AWS Posgres RDS, and DMS is used to replicate the changes, replication slot gets created for that. DMS replication is only after 4 tables, and in lower environment, there are not much changes in these tables, database could be idle for a long time.

What is happening is, when database is idle, replication slot cursor doesn't move and causes WAl files to be retained. However, new wal files ~64MB is getting added every 5 mins - due to some periodic background process in rdsadmin. This leds to posgres RDS Free disk space constantly reducing at at rate of 64MB every 5 mins.

Space is retained where there are changes in the tables subscribed by DMS, as the replication slot cursor moves, but in lower environment change frequency are quite low.

Posgres RDS is an upstream system managed by another team, i'm just consuming the data for downstream application. logical replication is causing increased disk space consumption during idle time, and this has been raised as an concern.

Could anyone suggest whats the best way to handle this. Is there a possibility of reducing the frequency of the periodic background process at posgres side or decreased the memory foot print that can be suggested to posgres team. Or is there a good way to cause replication slot cursor to move ahead from consumption ( DMS ) end when no data is captured.

refraining from below option as it will require implanting an extra process in posgres end

  • create a table -> having a process that constantly upserts - subscribing to this table as well - in DMS.

Any suggestions would be greatly appreciated.

已提問 2 年前檢視次數 770 次

1 個回答
0

Wal heartbeat feature should help in your case. please refer to https://repost.aws/knowledge-center/dms-high-storage-consumption-postgresql

AWS

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。