Skip to content

Support TYPE 'object_store' servers; make read_only a server option#320

Draft
sfc-gh-npuka wants to merge 2 commits into
naisila/catalog_user_mappingfrom
naisila/object_store
Draft

Support TYPE 'object_store' servers; make read_only a server option#320
sfc-gh-npuka wants to merge 2 commits into
naisila/catalog_user_mappingfrom
naisila/object_store

Conversation

@sfc-gh-npuka
Copy link
Copy Markdown
Collaborator

@sfc-gh-npuka sfc-gh-npuka commented Apr 17, 2026

NOTE: not ready for review yet

Allow CREATE SERVER ... TYPE 'object_store' FOREIGN DATA WRAPPER iceberg_catalog, mirroring the existing TYPE 'rest' pattern. Each server can carry its own location_prefix and read_only options, enabling shared writer/reader topologies where multiple Postgres instances point at the same S3 path.

Key changes:

  • ValidateIcebergCatalogServerDDL now accepts TYPE 'object_store' (TYPE 'postgres' remains rejected).
  • Add IsObjectStoreCatalog() in catalog_type.c, paralleling IsRestCatalog(); update HasObjectStoreCatalogTableOption to use it so that tables with catalog='<named_server>' resolve correctly.
  • Add ObjectStoreCatalogOptions struct and resolution function that reads server options with GUC fallback.
  • Add read_only as a server-level option (valid for both REST and object_store servers). Server read_only propagates to all tables unless overridden; table read_only='false' on a read_only server is an error.
  • Update create_table.c to resolve location_prefix from named object_store servers instead of requiring the GUC.
  • Update IcebergDefaultCatalogCheckHook to accept named object_store servers.
  • Update catalog export SPI query to include tables on named object_store servers.

Checklist

  • I have tested my changes and added tests if necessary
  • I updated documentation if needed
  • I confirm that all my commits are signed off (DCO)

Allow CREATE SERVER ... TYPE 'object_store' FOREIGN DATA WRAPPER
iceberg_catalog, mirroring the existing TYPE 'rest' pattern. Each
server can carry its own location_prefix and read_only options,
enabling shared writer/reader topologies where multiple Postgres
instances point at the same S3 path.

Key changes:
- ValidateIcebergCatalogServerDDL now accepts TYPE 'object_store'
  (TYPE 'postgres' remains rejected).
- Add IsObjectStoreCatalog() in catalog_type.c, paralleling
  IsRestCatalog(); update HasObjectStoreCatalogTableOption to use it
  so that tables with catalog='<named_server>' resolve correctly.
- Add ObjectStoreCatalogOptions struct and resolution function that
  reads server options with GUC fallback.
- Add read_only as a server-level option (valid for both REST and
  object_store servers). Server read_only propagates to all tables
  unless overridden; table read_only='false' on a read_only server
  is an error.
- Update create_table.c to resolve location_prefix from named
  object_store servers instead of requiring the GUC.
- Update IcebergDefaultCatalogCheckHook to accept named object_store
  servers.
- Update catalog export SPI query to include tables on named
  object_store servers.

Signed-off-by: sfc-gh-npuka <naisila.puka@snowflake.com>
@sfc-gh-npuka sfc-gh-npuka force-pushed the naisila/object_store branch from 5d0b9ef to fb0da6f Compare April 17, 2026 13:52
Signed-off-by: sfc-gh-npuka <naisila.puka@snowflake.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant