RE: Wrong relation in apply worker "not updatable" errors PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>for partitions; relcache leak in check_and_init_gencol()

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Ajin Cherian' <itsajin(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: Wrong relation in apply worker "not updatable" errors PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>for partitions; relcache leak in check_and_init_gencol()
Date: 2026-11-27 02:31:25
Message-ID: OS7PR01MB183175206ACDF87B1B4063DB5F5412@OS7PR01MB18317.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> 1. Apply worker reports the partitioned table instead of the leaf
> partition in some errors

I found that error context callback reports the remote relation's name as
"target relation", so it's consistent with it. When I ran the test after patching,
I got the below output:

```
ERROR: logical replication target relation "public.tab5_1" has neither REPLICA IDENTITY index nor PRIMARY KEY and published relation does not have REPLICA IDENTITY FULL
CONTEXT: processing remote data for replication origin "pg_16420" during message type "UPDATE" for replication target relation "public.tab5" in transaction 740, finished at 0/01808168
```

I feel Wwe should fix all or retain them.

> 2. Missing RelationClose() in check_and_init_gencol()

I have no strong opinion to fix it, but pgoutput_ensure_entry_cxt() should also
be done if we fix.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-11-27 02:42:01 Re: Fix deparsing of SUBSTRING SIMILAR with an operator as first argument
Previous Message David Rowley 2026-11-27 02:30:01 pg_upgrade's get_rel_infos_query() query can sometimes be slow