I am trying to understand what available options to replicate routing database.
I tried to use pglogical postgresql 16 and PUBLICATION with SUBSCRIPTION and specify in sems config primary ans secondary node, but over some time like ( 20 min ) , postgresql start produce errors that missing relations.
myusername2@127.0.0.1``(46340):cdrprod [4182241] STATEMENT: SELECT pgq.next_batch(‘cdr_billing’, ‘cdr_billing’) 2026-03-23 15:18:42 UTC ``myusername2@127.0.0.1``(46340):cdrprod [4182241] ERROR: Not subscriber to queue: async_cdr_statistics/async_cdr_statistics 2026-03-23 15:18:42 UTC ``myusername2@127.0.0.1``(46340):cdrprod [4182241] CONTEXT: PL/pgSQL function pgq.next_batch_custom(text,text,interval,integer,interval) line 70 at RAISE SQL statement “select f.batch_id, f.cur_tick_id, f.prev_tick_id, f.cur_tick_time, f.prev_tick_time, f.cur_tick_event_seq, f.prev_tick_event_seq from pgq.next_batch_custom(i_queue_name, i_consumer_name, NULL, NULL, NULL) f” PL/pgSQL function pgq.next_batch_info(text,text) line 33 at SQL statement SQL statement “select batch_id from pgq.next_batch_info(i_queue_name, i_consumer_name)” PL/pgSQL function pgq.next_batch(text,text) line 17 at SQL statement PL/pgSQL function switch.async_cdr_statistics() line 8 at assignment 2026-03-23 15:18:42 UTC ``myusername2@127.0.0.1``(46340):cdrprod [4182241] STATEMENT: SELECT processed_records FROM switch.async_cdr_statistics() 2026-03-23 15:19:00 UTC ``myusername@127.0.0.1``(52400):myhostname [4181078] ERROR: relation “events” does not exist at character 22 2026-03-23 15:19:00 UTC ``myusername@127.0.0.1``(52400):myhostname [4181078] STATEMENT: SELECT COUNT() FROM “events” 2026-03-23 15:19:00 UTC ``myusername@127.0.0.1``(52400):myhostname [4181078] ERROR: relation “nodes” does not exist at character 23 2026-03-23 15:19:00 UTC ``myusername@127.0.0.1``(52400):myhostname [4181078] STATEMENT: SELECT “nodes”. FROM “nodes” 2026-03-23 15:19:00 UTC ``myusername@127.0.0.1``(46338):myhostname [4182133] ERROR: relation “dialpeer_next_rates” does not exist at character 37 2026-03-23 15:19:00 UTC ``myusername@127.0.0.1``(46338):myhostname [4182133] STATEMENT: SELECT “dialpeer_next_rates”.* FROM “dialpeer_next_rates” WHERE “dialpeer_next_rates”.“applied” = $1 AND (apply_time < $2) ORDER BY “dialpeer_next_rates”.“id” ASC LIMIT $3
That on master, the issue when replication is running setup still produce a lot messages on missing SQL relations. I tried to drop databases and recreate, with database data restore.
Yes, on master. When I checked actual postgresql everything look ok, but yeti web sems are producing SQL statements errors. That seems some issue with schema.
I am not sure I can help you. It is not clear what you doing and what expecting. Any properly configured replication mechanism should not change database structure.
Let me try to clarify.
I am testing disaster recovery scenario a specially backup and restore of routing,cdr databases.
I am doing data only backup for routing database and for CDR normally only schema.
Questions raised so far.
When restoring routing data I can’t use seed option, because it creates conflict on restore.
I can’t find proper option to use under rake –tasks to setup CDR database only (seed the initial data) .
When CDR schema restored , ticker pgqd quits on start with error.