- Newest
- Most votes
- Most comments
Hi,
What do you have as an FK: "ON DELETE SET NULL" ?
If yes, your incremental set to null can be explained by delete activity on the primary table.
Then, check the delete activity on the table with PK to see where it comes from to stop it. Look at the WAL to see if such activity exists. For example, do you have some automatically triggered snapshot restore activity ?
Best,
Didier
Based on the information provided, this is indeed an unusual and complex issue. Let's address your questions and provide some insights:
-
The
rdsadmin
ROLLBACK
activity is not typical behavior and is not expected under normal circumstances. This could indicate an internal RDS process that's encountering an issue and rolling back changes. -
There are no known RDS internal processes that should revert table data under normal conditions. However, the behavior you're observing suggests that something is interfering with the data integrity.
-
The issue could potentially be related to the recent PostgreSQL upgrade from version 16 to 17. Major version upgrades can sometimes introduce unexpected behaviors, especially if there are any incompatibilities with existing configurations or extensions.
-
Unfortunately, there isn't a direct way for users to access detailed logs for
rdsadmin
activity. However, you can enable enhanced monitoring and performance insights to get more detailed information about database activity.
Given the complexity of your situation, here are some additional steps you could take:
-
Check for any PostgreSQL extensions that might be causing conflicts after the upgrade. Ensure all extensions are compatible with PostgreSQL 17.
-
Review your RDS parameter group settings thoroughly. Some parameters might need adjustment after a major version upgrade.
-
Monitor the
pg_stat_activity
view more closely, particularly around the times when data reverts. Look for any patterns in timing or concurrent activities. -
Consider creating a test environment with a snapshot of your database to safely experiment with different configurations and isolate the issue.
-
Check if there are any scheduled maintenance activities or automated processes running on your RDS instance that could be interfering with data integrity.
-
Review your application code for any potential issues with transaction management or connection pooling that could be causing unexpected rollbacks.
-
If the issue persists, it may be worth engaging AWS Support directly. They have access to more detailed logs and can investigate RDS-specific behaviors that might not be visible to users.
Remember, this is an unusual situation, and the root cause might be a combination of factors. Systematic investigation and potentially AWS Support involvement may be necessary to fully resolve the issue.
Sources
Amazon RDS for PostgreSQL now supports major version 17 - AWS
Upgrades of the RDS for PostgreSQL DB engine - Amazon Relational Database Service
Amazon RDS for PostgreSQL supports minor versions 15.5, 14.10, 13.13, 12.17, and 11.22
Relevant content
- asked 3 years ago
- asked a year ago
- asked 18 days ago
- asked 24 days ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated a year ago
Thanks for the answer Didier!
So we had an
ON DELETE CASCADE
on this FK (as the chapter_metadata was a localization table for the chapter itself, so whenever a chapter was deleted, the metadata would also be gone). We tried also removing the FK constraint (leaving the field with a plain UUID only), but the issue was still there. No chapters are touched; the FKs/PKs are still valid, but the table keeps reverting row-by-row after a while. We also checked theEvents
tab on the AWS RDS console page, and we only have the snapshot-creating record triggered once every day as expected, but no restore call.Thanks, Fernando