| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Hadi Moshayedi <hadi(at)moshayedi(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: REL_12_STABLE crashing with assertion failure in ExtractReplicaIdentity |
| Date: | 2019-09-01 21:31:09 |
| Message-ID: | 4422.1567373469@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
I wrote:
> As far as 4) goes, I think the code in ExtractReplicaIdentity is pretty
> duff anyway, because it doesn't bother to check for the defined failure
> return for RelationIdGetRelation. But if we're concerned about the
> cost of recalculating this stuff per-row, couldn't we cache it a little
> better? It should be safe to assume the set of index columns isn't
> changing intra-query.
> ... in fact, isn't all the infrastructure for that present already?
> Why is this code looking directly at the index at all, rather than
> using the relcache's rd_idattr bitmap?
Here's a proposed patch along those lines. It fixes Hadi's original
crash case and passes check-world.
I'm a bit suspicious of the exclusion for idattrs being empty, but
if I remove that, some of the contrib/test_decoding test results
change. Anybody want to comment on that? If that's actually an
expected situation, why is there an elog(DEBUG) in that path?
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| avoid-accessing-replica-identity-index-1.patch | text/x-diff | 3.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Euler Taveira | 2019-09-01 23:43:57 | Re: row filtering for logical replication |
| Previous Message | Tom Lane | 2019-09-01 20:50:00 | Re: REL_12_STABLE crashing with assertion failure in ExtractReplicaIdentity |