Skip to content

Query would be affected by row-level security policy #496

Open
@12diego34

Description

@12diego34

Bug Report

pg_dump: error: query failed: ERROR: query would be affected by row-level security policy for table

Describe the bug

Within a postgresql database, hosted in aws, I have a series of tables that have the row-level policy activated.

When I want to run the backup on S3, I get the error:

pg_dump: error: query failed: ERROR: query would be affected by row-level security policy.
HINT: To disable the policy for the table's owner, use ALTER TABLE NO FORCE ROW LEVEL SECURITY

To Reproduce

In order to reproduce the error, you can have a table with the row-level policy activated and try to make a backup. I don't know if it matters if the destination is an S3 bucket.

Expected behavior

Being able to make a backup of the database, regardless of whether there are tables that have or do not have the policy activated at the row level.

Versions

Django-dbbackup

  • pypi: 4.0.2

External tools

  • Python: 3.8.10
  • Django: 3.2.4
  • OS: Ubuntu 20.04.6 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions