On 2014-09-16 20:03:21 +0200, pba@mailme.dk wrote:
> With DDL disabled then create extension posgis gives a loop on the "slave"
>
> LOG: starting background worker process "bdr
> (6059699842869179629,1,16384,): beta: apply"
> ERROR: relation "public.spatial_ref_sys" does not exist
> LOG: worker process: bdr (6059699842869179629,1,16384,): beta: apply (PID
> 10482) exited with exit code 1
>
> And then I can't create the extension on the "slave".
> Per the concept of
> BDR this is also reasonable since the postgis extension is a good mix of
> DDL and DML.
Right. I guess we could actually relatively easily "fix" that. Something like:
SELECT pg_replication_identifier_create('dont-replay');
SELECT pg_replication_identifier_setup_replaying_from('dont-replay');
BEGIN;
SET LOCAL bdr.skip_ddl_replication=on;
SET LOCAL bdr.permit_unsafe_commands=on;
CREATE EXTENSION whatever;
COMMIT;
SELECT pg_replication_identifier_reset_replaying_from();
Which obviously isn't particularly nice... Although a bit cool :P
> However in all of my tests I sooner or later end up with a DDL endless
> loop error due to a create or replace something in my scripts and
> applications => reinstallation. Hence my interest in error recovery :-)
The CREATE OR REPLACE VIEW errors already are fixed :). Albeit only in
the newly structured branches (branches bdr-plugin/next and
bdr-pg/REL9_4_STABLE) for bdr 9.4. For which no instructions about
compiling exist yet :(
> But I will keep on testing because the end result will be very valuable.
Cool!
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services