| From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
|---|---|
| To: | Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com> |
| Cc: | shveta malik <shveta(dot)malik(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, YeXiu <1518981153(at)qq(dot)com>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Skipping schema changes in publication |
| Date: | 2026-02-19 10:38:01 |
| Message-ID: | CAFiTN-t2is4AOsNMw6iUcn-9cRTSUyQgivkbVjAE-6LjuVHC2w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Feb 19, 2026 at 10:13 AM Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com> wrote:
>
> Thanks for reviewing the patch. I have addressed the remaining
> comments in the v46 patch..
>
I am looking at the latest version some questions/comments
1.
GetRelationPublications()
{
..
for (int i = 0; i < pubrellist->n_members; i++)
{
+ if (pubrel->prexcept)
+ {
+ if (except_pubids)
+ *except_pubids = lappend_oid(*except_pubids, pubid);
+ }
+ else
+ {
+ if (pubids)
+ *pubids = lappend_oid(*pubids, pubid);
+ found = true;
+ }
}
Can we simplify this multi-level check to something simple by using
some temporary variable?
Suggestions:
for (int i = 0; i < pubrellist->n_members; i++)
{
List **target_list = pubrel->prexcept ? except_pubids : pubids;
if (target_list)
*target_list = lappend_oid(*target_list, pubid);
if (!pubrel->prexcept)
found = true;
}
2.
-extern List *GetPublicationRelations(Oid pubid, PublicationPartOpt
pub_partopt);
+extern List *GetIncludedRelationsByPub(Oid pubid,
+ PublicationPartOpt pub_partopt);
I don't really like renaming this function, IMHO the
GetPublicationRelations() means all the published relation, we don't
need to be explicit about *Included* relation. Then I see we have
another function to fetch the excluded relation i.e.
GetExcludedTablesByPub() so maybe this makes sense considering we have
a requirement for fetching included as well as excluded.
3. Question, what would be the behavior of
pg_get_publication_tables(), if we have created PUBLICATION FOR ALL
TABLES with EXCEPT, I assume it will give all table even in the EXCEPT
list as we have another function to get effective tables i.e.
pg_get_publication_effective_tables(), so my question is are we
planning to add an additional field in pg_get_publication_tables() to
explicitly mention that the table is EXCLUDED?
--
Regards,
Dilip Kumar
Google
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andreas Karlsson | 2026-02-19 11:23:12 | Re: Remove obsolete SAMESIGN macro |
| Previous Message | Mingli Zhang | 2026-02-19 10:37:05 | Re: Recommended TPC-DS tools/setup for PostgreSQL benchmarking? |