-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pg_dump: warning: there are circular foreign-key constraints on this table #12
Comments
Just came to report the same issue. Seeing this every hour and backups are no longer working. I think it's started happening since upgrading my Postgres instance from the legacy plugin architecture to the new Railway database with volume setup. Not sure what's changed under the hood to cause it. I found a related issue here on the timescale db repo. Some comments suggest it's just a warning but it seems to me this is an error that prevents backups working? Error while running backup: {
stderr: 'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: hypertable\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +
'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: chunk\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +
'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: continuous_agg\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.'
} |
I think I found my problem, my data is corrupted or have some problems between relations on Strapi. I think this still make some backup but dunno if backup everything. |
The latest update to the repo added in a check that fails if there are any warnings from pg_dump, rather than just errors. This means that backups that were previously running well will now fail. If you comment out lines 47-50 in backup.ts and redeploy it to Railway, then the backups should run just fine. However, I would make sure to test out restoring your DB backup once you do so to make sure that the warnings aren't a deeper issue that will prevent you from restoring them in the future. |
Same problem here. Will try @RyanElder's suggestion. |
fixed in #13 |
Hello, 2 day ago I made everything by the tutorial but it gives me this error and doesnt create backup:
`containers-us-west-22.railway.app:8007 - accepting connections
pg_dump (PostgreSQL) 16.1
NodeJS Version: v18.18.2
Backup cron scheduled...
Initiating DB backup...
Dumping DB to file...
Error while running backup: {
stderr: 'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: hypertable\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +
'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: chunk\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.'
}
Initiating DB backup...
Dumping DB to file...
Error while running backup: {
stderr: 'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: hypertable\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.\n' +
'pg_dump: warning: there are circular foreign-key constraints on this table:\n' +
'pg_dump: detail: chunk\n' +
'pg_dump: hint: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints.\n' +
'pg_dump: hint: Consider using a full dump instead of a --data-only dump to avoid this problem.'
}`
I have env variables:
![image](https://private-user-images.githubusercontent.com/34811964/286553907-b5fc2a57-5510-47d0-9645-cba308637398.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5ODM3MTQsIm5iZiI6MTczODk4MzQxNCwicGF0aCI6Ii8zNDgxMTk2NC8yODY1NTM5MDctYjVmYzJhNTctNTUxMC00N2QwLTk2NDUtY2JhMzA4NjM3Mzk4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAyNTY1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgzZTNkN2NjMzQxNGVlMGM2NGY1YmNlYTZmNTc3NGNhZjlhOTc2Yjc1OTkzZGMzZjk0MTViNzg2MWIyY2UzMGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.bvXbfnSjECdE6xwr2eJ8k5nZhKJNIFzmBP3kvgIqEOY)
Did I miss something? Can somebody help?
Thanks!
The text was updated successfully, but these errors were encountered: