From: alexander.a.rodionov@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #13562: BDR requires primary key to be defined on a view
Date: Tue, 11 Aug 2015 12:10:50 +0000
Message-ID: <20150811121050.2694.28788@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: alexander.a.rodionov@gmail.com
Subject: Re: BUG #13562: BDR requires primary key to be defined on a view
In-Reply-To: <20150811121050.2694.28788@wrigleys.postgresql.org>
References: <20150811121050.2694.28788@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox