| From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | kedar anavardekar <kedar(dot)anavardekar(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Takeshi Ideriha <iderihatakeshi(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Publication of same parent table with ONLY-ness mismatch should error |
| Date: | 2026-10-26 00:49:59 |
| Message-ID: | CAHut+Pv6qqOFqz0aze_jgNSFgZShj8UkrfdKaZ35GL3LN=J0jA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Oct 23, 2026 at 1:24 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>
>
>
> > On Oct 21, 2026, at 06:58, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> >
> > Oops. The previously posted patch v5 was broken/incomplete.
> >
> > PSA patch v6.
> >
> > ======
> > Kind Regards,
> > Peter Smith.
> > Fujitsu Australia
> > <v6-0001-Error-if-same-table-has-ONLY-mismatch.patch>
>
> V6 overall LGTM.
>
> A nit comment:
> ```
> + if (list_member_oid(relids_explicit, myrelid) &&
> + recurse != list_member_oid(relids_recursing, myrelid) &&
> + rel->rd_rel->relkind != RELKIND_PARTITIONED_TABLE)
> + ereport(ERROR,
> + (errcode(ERRCODE_DUPLICATE_OBJECT),
> + errmsg("conflicting ONLY specifications for table \"%s\"",
> + RelationGetRelationName(rel))));
> ```
>
> Would it be slightly better to put rel->rd_rel->relkind != RELKIND_PARTITIONED_TABLE first? So that partitioned tables skip both list searches.
>
Agreed. Done as suggested.
PSA v7.
======
Kind Regards,
Peter Smith.
Fujitsu Australia
| Attachment | Content-Type | Size |
|---|---|---|
| v7-0001-Error-if-same-table-has-ONLY-mismatch.patch | application/octet-stream | 15.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tomas Vondra | 2026-10-26 00:53:13 | improving handling of FPIs during recovery prefetching |
| Previous Message | Chao Li | 2026-10-26 00:48:49 | Re: Avoid truncated or zero-padded copies of replaced files in backups. |