BUG #13562: BDR requires primary key to be defined on a view

From: alexander(dot)a(dot)rodionov(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13562: BDR requires primary key to be defined on a view
Date: 2015-08-11 12:10:50
Message-ID: 20150811121050.2694.28788@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 13562
Logged by: Alexander Rodionov
Email address: alexander(dot)a(dot)rodionov(at)gmail(dot)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.

Browse pgsql-bugs by date

  From Date Subject
Next Message navaldeep.sandhu 2015-08-11 15:25:52 BUG #13566: postgis_21_sample won't install using the stack builder
Previous Message Michael Meskes 2015-08-11 08:10:21 Re: BUG #13557: ESQL select issue