Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support schema change notifications and introspection reloading from PostgreSQL #19

Open
jmealo opened this issue May 31, 2018 · 1 comment

Comments

@jmealo
Copy link
Collaborator

jmealo commented May 31, 2018

This issue serves as a discussion for adding schema change notifications and introspection reloading support to PostgreSQL.

Relevant documentation pages:

The following event triggers seem like a good start for most introspection/schema tasks.

ALTER TABLE
ALTER SEQUENCE
ALTER SCHEMA
ALTER TABLE
ALTER VIEW

CREATE SCHEMA
CREATE SEQUENCE
CREATE TABLE
CREATE TABLE AS
CREATE VIEW

DROP SCHEMA
DROP SEQUENCE
DROP TABLE
DROP VIEW

GRANT

It would be trivial to support all events and push filtering into the consumer or using code generation.

It appears that the plpgsql example shows a good path forward as we can emit generic WAL messages easily.

I think it makes sense to specify an introspection function or materialized view and either refresh that view or emit the output of the function as a generic WAL message.

Optionally, we could emit the event trigger as a generic WAL message or NOTIFY and allow processing else where.

The question becomes whether we package schema reloading as an installable extension or suggest that this functionality is pushed into jsoncdc.

Pinging relevant parties on the following issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant