Skip to main content

execute_plan

Function execute_plan 

Source
pub async fn execute_plan(
    client: &Client,
    plan: &PostgresPolicyPlan,
    pool: &PgPool,
    sql_context: &SqlContext,
    changes: &[Change],
) -> Result<(), ReconcileError>
Expand description

Execute an approved plan against the database.

Re-renders executable SQL from the reconciler’s in-memory changes, executes it in a transaction, and updates the plan status to Applied or Failed. Persisted SQL on the plan is a redacted review artifact only; apply must not read it because large plans may store only a truncated preview.