Skip to content

sql: support postgresql foreign data wrapper #20249

@jensneuse

Description

@jensneuse

We'd like to build a large scale CMS with postgresql as source of truth + cockroachdb as denormalized data store for public access.

To keep both systems in sync via transactions I'd like to use a foreign data wrapper.

As per the documentation of postgresql foreign data wrapper module postgresql executes a few commands on client connection startup such as 'set timezone' etc.. (see documentation: https://www.postgresql.org/docs/9.4/static/postgres-fdw.html => F.32.5.)

These sql commands are currently not supported by cockroachdb.
A possible workaround could be to use pg_notify to inform an external application to sync changes. However we'd lose transactions this way which is a blocker.

Jira issue: CRDB-5937

gz#20998

Epic CRDB-60820

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sql-pgcompatSemantic compatibility with PostgreSQLC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)O-communityOriginated from the communityT-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions