Skip to content

cannot use views #6

Open
Slania opened this Issue Feb 28, 2016 · 2 comments

2 participants

@Slania
Slania commented Feb 28, 2016
CREATE TABLE jobs(job_id SERIAL PRIMARY KEY, key_to_be_incremented INTEGER NOT NULL, being_worked_on_by TEXT, completed BOOLEAN DEFAULT FALSE , created_at TIMESTAMP, updated_at TIMESTAMP);
CREATE VIEW queued_jobs AS SELECT job_id, created_at, updated_at FROM jobs WHERE being_worked_on_by IS NULL AND completed IS NOT TRUE;

srangarajan=# select * from queued_jobs;
ERROR:  relation "(null)" is not managed by pg_paxos
@marcocitus
Citus Data member

You can use views on pg_paxos tables by marking the view as replicated:

SELECT paxos_replicate_table('group', 'queued_jobs');
@marcocitus
Citus Data member

Leaving this issue open since the error message should be improved and calling paxos_replicate_table seems unnecessary from a technical point-of-view. This check can maybe be relaxed to allow Paxos tables to be joined with non-Paxos tables, the main thing to prevent is queries with multiple Paxos tables in different groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.