RE: Logical Replication of sequences
| От | Hayato Kuroda (Fujitsu) | 
|---|---|
| Тема | RE: Logical Replication of sequences | 
| Дата | |
| Msg-id | OSCPR01MB14966B8BB27B784674506C9A8F5EBA@OSCPR01MB14966.jpnprd01.prod.outlook.com обсуждение исходный текст  | 
		
| Ответ на | RE: Logical Replication of sequences ("Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>) | 
| Ответы | 
                	
            		Re: Logical Replication of sequences
            		
            		 RE: Logical Replication of sequences  | 
		
| Список | pgsql-hackers | 
Dear Hou,
Thanks for updating the patch. Here are comments for recent 0002.
Others are still being reviewed
01. pg_subscription_rel.h
```
+#include "nodes/primnodes.h"
```
The inclusion is not needed because the 
02. typedefs.list
```
+SubscriptionRelKind
```
Missing update.
03. subscritioncmds.c
```
+#include "catalog/pg_sequence.h"
```
I could build without the inclusion. Can you remove?
04. check_publications_origin
```
+
+       query = "SELECT DISTINCT P.pubname AS pubname\n"
+                       "FROM pg_publication P,\n"
+                       "     LATERAL %s GPR\n"
...
```
pgindent does not like the notation. How aboout chaning the line after the "="?
I.e.,
```
    query =
        "SELECT DISTINCT P.pubname AS pubname\n"
        "FROM pg_publication P,\n"
        "     LATERAL %s GPR\n"
...
```
05. AddSubscriptionRelState
```
    if (HeapTupleIsValid(tup))
        elog(ERROR, "subscription table %u in subscription %u already exists",
             relid, subid);
```
Theoretically subid might be the sequence, right? Should we say "relation"
instead of "table" as well?
06. AlterSubscription_refresh_seq
```
+               /* Get local relation list. */
```
In contrast can we say "sequence"?
07. check_publications_origin
```
    if (res->status != WALRCV_OK_TUPLES)
        ereport(ERROR,
                (errcode(ERRCODE_CONNECTION_FAILURE),
                 errmsg("could not receive list of replicated tables from the publisher: %s",
                        res->err)));
```
Should we say "relations" instead of "tables"? Similar lines are:
```
    /* Process tables. */
...
     * Log a warning if the publisher has subscribed to the same table from
```
Best regards,
Hayato Kuroda
FUJITSU LIMITED
 
		
	В списке pgsql-hackers по дате отправления: