Skip to content

Employ transaction_read_only #10

@danolivo

Description

@danolivo

Hi,

I wonder why you use your own control [1] over the existing XactReadOnly machinery? It seems to me that it would be enough if your GUC just changed and restored this value in the backend on Executor Start (potentially, during planning/parsing) - the standard ExecCheckXactReadOnly() should prevent DML/DDL executions ...

Also, I think for the replication apply workers, this restriction might be implemented through a SMGR hook somehow.

[1]

ereport(ERROR, (errmsg("pg_readonly: pgro_exec: invalid statement because cluster is read-only")));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions