Re: Relation cache invalidation on replica - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Relation cache invalidation on replica
Date
Msg-id 20160227021405.mcowwq3u2vcg4g6n@alap3.anarazel.de
Whole thread Raw
In response to Re: Relation cache invalidation on replica  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On 2016-02-27 01:45:57 +0000, Simon Riggs wrote:
> Surely then the fix is to make heap_inplace_update() assign an xid? That
> way any catalog change will always generate a commit record containing the
> invalidation that goes with the change. No need to fix up the breakage
> later.

Well, we could, but it'd also break things where we rely on
heap_inplace_update not assigning an xid.  I'm not seing why that's
better than my proposal of doing this
(http://archives.postgresql.org/message-id/20160227002958.peftvmcx4dxwe244%40alap3.anarazel.de),
by emitting a commit record in RecordTransactionCommmit() if nrels != 0
|| nmsgs != 0 || RelcacheInitFileInval
.

> The other heap_insert|update|delete functions (and similar) all assign xid,
> so it is consistent for us to do that for inplace_update also.

I don't think that follows. Inplace updates an absolute special case,
where are *not allowed* to include an xid in the tuple.

Andres



pgsql-hackers by date:

Previous
From: Vitaly Burovoy
Date:
Subject: Re: [PATH] Correct negative/zero year in to_date/to_timestamp
Next
From: Peter Eisentraut
Date:
Subject: Re: Sanity checking for ./configure options?