Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4ad31bb

Browse files
committed
Remove unused column atttypmod from initial tablesync query
The initial tablesync done by logical replication used a query to fetchthe information of a relation's columns that included atttypmod, but itwas left unused. This was added by7c4f524.Author: Euler TaveiraReviewed-by: Önder Kalacı, Amit Langote, Japin LiDiscussion:https://postgr.es/m/CAHE3wggb715X+mK_DitLXF25B=jE6xyNCH4YOwM860JR7HarGQ@mail.gmail.com
1 parent9522085 commit4ad31bb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎src/backend/replication/logical/tablesync.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ fetch_remote_table_info(char *nspname, char *relname,
640640
StringInfoDatacmd;
641641
TupleTableSlot*slot;
642642
OidtableRow[]= {OIDOID,CHAROID,CHAROID};
643-
OidattrRow[]= {TEXTOID,OIDOID,INT4OID,BOOLOID};
643+
OidattrRow[]= {TEXTOID,OIDOID,BOOLOID};
644644
boolisnull;
645645
intnatt;
646646

@@ -685,7 +685,6 @@ fetch_remote_table_info(char *nspname, char *relname,
685685
appendStringInfo(&cmd,
686686
"SELECT a.attname,"
687687
" a.atttypid,"
688-
" a.atttypmod,"
689688
" a.attnum = ANY(i.indkey)"
690689
" FROM pg_catalog.pg_attribute a"
691690
" LEFT JOIN pg_catalog.pg_index i"
@@ -718,7 +717,7 @@ fetch_remote_table_info(char *nspname, char *relname,
718717
Assert(!isnull);
719718
lrel->atttyps[natt]=DatumGetObjectId(slot_getattr(slot,2,&isnull));
720719
Assert(!isnull);
721-
if (DatumGetBool(slot_getattr(slot,4,&isnull)))
720+
if (DatumGetBool(slot_getattr(slot,3,&isnull)))
722721
lrel->attkeys=bms_add_member(lrel->attkeys,natt);
723722

724723
/* Should never happen. */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp