Re: Logical Decoding - Execute join query - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Logical Decoding - Execute join query
Date
Msg-id 20160401094544.GH9074@awork2.anarazel.de
Whole thread Raw
In response to Logical Decoding - Execute join query  ("hari.prasath" <hari.prasath@zohocorp.com>)
Responses Re: Logical Decoding - Execute join query  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Hi,

On 2016-04-01 15:09:59 +0530, hari.prasath wrote:
>       I tried to execute a join query using SPI_execute() in logical
>       decoding part and got inconsistent values (i am referring it as
>       inconsistent since it is returning the old values which is
>       present at the postgresql server start).

You are not allowed to access non catalog tables in an output plugin. To quote the manual:
> Read only access to relations is permitted as long as only relations are
> accessed that either have been created by <command>initdb</command> in
> the <literal>pg_catalog</literal> schema, or have been marked as user
> provided catalog tables using


The reason for that is that we'd have to keep all rows in the tables, if
you wanted to be look at the state "in the past".

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: WIP: Access method extendability
Next
From: Ian Barwick
Date:
Subject: Re: Correction for replication slot creation error message in 9.6