So I need to import django fixtures (e.g. a django's database dump essentially) in postgres on a aws rds instance. I have tested locally that the constraints of the DB are all valid (by importing locally in a replica). Then I have pushed the fixtures to the aws django server, and going to use django's loaddata function to load them, and django will push them to the rds db.
In order to load those fixtures (because many models's fk reference each others), I need to disable the fk checks in postgres in order to load the data. In order to do so, I have a script:
begin; alter table foo_bar disable trigger all; .... other tables same cmd .... commit;
Then I run a similar list of commands with enable to re-instate the constraints.
When I tested this locally in my replica it worked fine. However, on rds, when I try to run the script (connecting to the db with Dbeaver), I get this error:
SQLERROR : permission denied: "RI_constrainttrigger_a_19346" is a system trigger.
I seem to understand that this would be due to my current user not having the rights (on the rds postgres instance) to perform that operation?
MY question is: how I can check/change the rights on the rds instance so that my postgres user has the right to run that command?
PS: I'm not super knowledgeable in postgres/rds, so ideally provide a bit of background for potentially non-obvious things. Thanks!