BUG #13562: BDR requires primary key to be defined on a view - Mailing list pgsql-bugs

From alexander.a.rodionov@gmail.com
Subject BUG #13562: BDR requires primary key to be defined on a view
Date
Msg-id 20150811121050.2694.28788@wrigleys.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      13562
Logged by:          Alexander Rodionov
Email address:      alexander.a.rodionov@gmail.com
PostgreSQL version: 9.4.2
Operating system:   Debian
Description:

In my schema I have a view with a trigger INSTEAD OF INSERT OR UPDATE OR
DELETE. This trigger is intended to implement CRUD operation mapping to this
view.

After setting up BDR replication any attempt to update this view results in
ERROR:  Cannot run UPDATE or DELETE on table <<NAME_OF_THE_VIEW>> because it
does not have primary key.

Putting debug RAISE into associated trigger function confirms that this
error occurs prior to trigger function execution.

According to BRD documentation there is no obvious way to workaround this
issue, as there is no means to exclude a specific entity from replication
scope.

>From my viewpoint including views in replication process is not a good
practice, as they not only derive their data from table entities, but also
can't have a primary key in postgresql required for replication.

If there is a way to disable view operations please suggest one.

pgsql-bugs by date:

Previous
From: manuel.pallier@beko.at
Date:
Subject: BUG #13561: "could not write to log file, Bad file descriptor" error when working with huge table
Next
From: navaldeep.sandhu@gmail.com
Date:
Subject: BUG #13566: postgis_21_sample won't install using the stack builder