Обсуждение: BUG #13562: BDR requires primary key to be defined on a view
BUG #13562: BDR requires primary key to be defined on a view
От
alexander.a.rodionov@gmail.com
Дата:
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.