Catalog Versioning

Learn how DuckDB detects catalog changes in Arrow Flight servers using version tracking for automatic cache invalidation and refresh.

Multiple DuckDB sessions can simultaneously access a single Arrow Flight server. When one session modifies or creates an object in the database or catalog, other attached clients detect the change the next time they run a query. For example, if one session creates a table, that table becomes visible to other clients immediately upon creation.

DuckDB caches the entire catalog contents—including schemas, tables, and functions—for performance. However, before executing each query, DuckDB verifies that the cached information remains valid by checking the catalog version (represented as an integer). If the version has changed, DuckDB refreshes the cache by querying the Arrow Flight server.

Arrow Flight Server Implementation

The Airport extension issues a DoAction Arrow Flight RPC with the action name catalog_version.