-
Notifications
You must be signed in to change notification settings - Fork 236
concurrency issue when granting privileges on tables with postgresql_grant #425
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
Comments
Same issue for us, need to apply several times. |
Removed table lock in DB |
Why was this issue closed? I'm still seeing this issue even with version |
I've verified |
I finally fixed this issue once I changed the owner of the database and schema from one of the roles defined in the terraform to the DBMS superuser role. I also added a |
Uh oh!
There was an error while loading. Please reload this page.
Hi there,
We're encountering a persistent issue during the execution of Terraform apply, consistently receiving the error message: "Error: Could not execute revoke query: pq: tuple concurrently updated." Despite upgrading the provider to cyrilgdn/postgresql 1.18.0, the error remains unresolved
Terraform Version
Terraform v1.5.0
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
resource "postgresql_grant" "rw_role_table_crud" {
depends_on = [postgresql_schema.public]
count = var.create_rw_role ? 1 : 0
database = postgresql_database.service_database[0].name
role = postgresql_role.rw_role[0].name
object_type = "table"
schema = "public"
privileges = ["INSERT", "SELECT", "UPDATE", "DELETE", "TRUNCATE"]
}
resource "postgresql_grant" "ro_role_table_crud" {
depends_on = [postgresql_schema.public]
count = var.create_ro_role ? 1 : 0
database = postgresql_database.service_database[0].name
role = postgresql_role.ro_role[0].name
object_type = "table"
schema = "public"
privileges = ["SELECT"]
}
Actual Behavior
│ Error: could not execute revoke query: pq: tuple concurrently updated
│
│ with module.cp-database.postgresql_grant.rw_role_table_crud[0],
│ on ../../modules/postgresql-db/main.tf line 155, in resource "postgresql_grant" "rw_role_table_crud":
│ 155: resource "postgresql_grant" "rw_role_table_crud" {
│
╵
╷
│ Error: could not execute revoke query: pq: tuple concurrently updated
│
│ with module.cp-database.postgresql_grant.ro_role_table_crud[0],
│ on ../../modules/postgresql-db/main.tf line 244, in resource "postgresql_grant" "ro_role_table_crud":
│ 244: resource "postgresql_grant" "ro_role_table_crud" {
│
╵
Steps to Reproduce
terraform apply
Important Factoids
The DB is running on AWS RDS with Engine version: 13.11
References
The text was updated successfully, but these errors were encountered: