You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fail fast at statement time on cross-catalog DML. Rename
ValidateXactRestCatalog to BindRelationToXactRestCatalog and call it from
both FDW write paths (postgresBeginForeignModify and AddQueryResultToTable).
The function now binds the transaction to the relation's REST catalog on
the first DML and rejects any subsequent statement targeting a different
catalog, so the second INSERT errors out before any Parquet is written.
The pre-commit hook is kept as a belt-and-suspenders fallback for DDL
paths that reach the tracker without going through the new guard. The
regression test asserts the second INSERT (not COMMIT) raises.
Move ValidateIcebergCatalogServerDDL registration from pg_lake_table to
pg_lake_iceberg, where the handler is actually defined. Architecturally
this puts ownership of catalog-server DDL validation in the extension
that owns the catalog server abstraction.
Fix latent dangling-pointer in GetValidCatalogOptionsHint. The static
hint cache was allocated via initStringInfo in whatever short-lived
context the validator happened to be running in (typically MessageContext),
so the second invalid-option failure in the same backend returned freed
memory to errhint. Allocate in TopMemoryContext so the cache survives
transaction boundaries. The strengthened test_reject_unknown_server_option
now issues two failing CREATE SERVER statements on the same connection and
asserts the full option list appears in the hint on both attempts; the
previous version would not have caught this bug.
Also covers earlier review-driven hardening on the same branch: token
cache invalidation on ALTER SERVER credentials, ALTER SERVER rest_endpoint
blocking for all dependent REST iceberg tables (writable and read-only),
and DROP OWNED BY / concurrent DROP SERVER dependency tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: sfc-gh-npuka <naisila.puka@snowflake.com>
0 commit comments