RE: Single transaction in the tablesync worker?

Поиск
Список
Период
Сортировка
Искать
От
Hou, Zhijie
Тема
RE: Single transaction in the tablesync worker?
Дата
Msg-id
0dafe017e4e04872a69ac899c9bb395e@G08CNEXMBPEKD05.g08.fujitsu.local
Ответ на
Список
Дерево обсуждения
Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Craig Ringer <craig.ringer@enterprisedb.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Dilip Kumar <dilipbalaut@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
RE: Single transaction in the tablesync worker? "Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
RE: Single transaction in the tablesync worker? "Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
RE: Single transaction in the tablesync worker? "Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
RE: Single transaction in the tablesync worker? "Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Petr Jelinek <petr.jelinek@enterprisedb.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Petr Jelinek <petr.jelinek@enterprisedb.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Petr Jelinek <petr.jelinek@enterprisedb.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Petr Jelinek <petr.jelinek@enterprisedb.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Petr Jelinek <petr.jelinek@enterprisedb.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
RE: Single transaction in the tablesync worker? "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
RE: Single transaction in the tablesync worker? "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
RE: Single transaction in the tablesync worker? "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
RE: Single transaction in the tablesync worker? "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
RE: Single transaction in the tablesync worker? "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Ajin Cherian <itsajin@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Peter Smith <smithpb2250@gmail.com>
Re: Single transaction in the tablesync worker? Craig Ringer <craig.ringer@enterprisedb.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Craig Ringer <craig.ringer@enterprisedb.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
Re: Single transaction in the tablesync worker? Amit Kapila <amit.kapila16@gmail.com>
> PSA the v12 patch for the Tablesync Solution1.
> 
> Differences from v11:
>   + Added PG docs to mention the tablesync slot
>   + Refactored tablesync slot drop (done by
> DropSubscription/process_syncing_tables_for_sync)
>   + Fixed PG docs mentioning wrong state code
>   + Fixed wrong code comment describing TCOPYDONE state
> 
Hi

I look into the new patch and have some comments.

1.
+	/* Setup replication origin tracking. */
①+	originid = replorigin_by_name(originname, true);
+	if (!OidIsValid(originid))
+	{

②+			originid = replorigin_by_name(originname, true);
+			if (originid != InvalidRepOriginId)
+			{

There are two different style code which check whether originid is valid.
Both are fine, but do you think it’s better to have a same style here?


2.
  *		 state to SYNCDONE.  There might be zero changes applied between
  *		 CATCHUP and SYNCDONE, because the sync worker might be ahead of the
  *		 apply worker.
+ *	   - The sync worker has a intermediary state TCOPYDONE which comes after
+ *		DATASYNC and before SYNCWAIT. This state indicates that the initial

This comment about TCOPYDONE is better to be placed at [1]*, where is between DATASYNC and SYNCWAIT.

 *	   - Tablesync worker starts; changes table state from INIT to DATASYNC while
 *		 copying.
 [1]*
 *	   - Tablesync worker finishes the copy and sets table state to SYNCWAIT;
 *		 waits for state change.

3.
+	/*
+	 * To build a slot name for the sync work, we are limited to NAMEDATALEN -
+	 * 1 characters.
+	 *
+	 * The name is calculated as pg_%u_sync_%u (3 + 10 + 6 + 10 + '\0'). (It's
+	 * actually the NAMEDATALEN on the remote that matters, but this scheme
+	 * will also work reasonably if that is different.)
+	 */
+	StaticAssertStmt(NAMEDATALEN >= 32, "NAMEDATALEN too small");	/* for sanity */
+
+	syncslotname = psprintf("pg_%u_sync_%u", suboid, relid);

The comments says syncslotname is limit to NAMEDATALEN - 1 characters.
But the actual size of it is (3 + 10 + 6 + 10 + '\0') = 30,which seems not NAMEDATALEN - 1.
Should we change the comment here?

Best regards,
houzj




В списке pgsql-hackers по дате отправления
От: Fujii Masao
Дата:
От: Kyotaro Horiguchi
Дата:
FAQ