From: | Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com> |
---|---|
To: | Amit Langote <amitlangote09(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: adding partitioned tables to publications |
Date: | 2020-01-06 11:25:32 |
Message-ID: | CA+FpmFfKmsNww_C5hWU-=wg9h3cyV7vZcCUKWrrhtLkteUtY4w@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Amit,
I went through this patch set once again today and here are my two cents.
On Mon, 16 Dec 2019 at 10:19, Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
>
> Attached updated patches.
- differently partitioned setup. Attempts to replicate tables other than
- base tables will result in an error.
+ Replication is only supported by regular and partitioned tables, although
+ the table kind must match between the two servers, that is, one cannot
I find the phrase 'table kind' a bit odd, how about something like
type of the table.
/* Only plain tables can be aded to publications. */
- if (tbinfo->relkind != RELKIND_RELATION)
+ /* Only plain and partitioned tables can be added to publications. */
IMHO using regular instead of plain would be more consistent.
+ /*
+ * Find a partition for the tuple contained in remoteslot.
+ *
+ * For insert, remoteslot is tuple to insert. For update and delete, it
+ * is the tuple to be replaced and deleted, repectively.
+ */
Misspelled 'respectively'.
+static void
+apply_handle_tuple_routing(ResultRelInfo *relinfo,
+ LogicalRepRelMapEntry *relmapentry,
+ EState *estate, CmdType operation,
+ TupleTableSlot *remoteslot,
+ LogicalRepTupleData *newtup)
+{
+ Relation rel = relinfo->ri_RelationDesc;
+ ModifyTableState *mtstate = NULL;
+ PartitionTupleRouting *proute = NULL;
+ ResultRelInfo *partrelinfo,
+ *partrelinfo1;
IMHO, partrelinfo1 can be better named to improve readability.
Otherwise, as Dilip already mentioned, there is a rebase required
particularly for 0003 and 0004.
--
Regards,
Rafia Sabih
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2020-01-06 12:11:42 | Re: Greatest Common Divisor |
Previous Message | Dilip Kumar | 2020-01-06 11:14:17 | Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions |