Remove unnecessary pstrdup in fetch_table_list.
The result of TextDatumGetCString is already palloc'ed so we don't need to
allocate memory for it again. We decide not to backpatch it as there
doesn't seem to be any case where it can create a meaningful leak.
Author: Zhijie Hou
Discussion:
@@ -1267,7 +1267,7 @@ fetch_table_list(WalReceiverConn *wrconn, List *publications)
relname = TextDatumGetCString(slot_getattr(slot, 2, &isnull));
Assert(!isnull);
- rv = makeRangeVar(pstrdup(nspname), pstrdup(relname), -1);
+ rv = makeRangeVar(nspname, relname, -1);
tablelist = lappend(tablelist, rv);
ExecClearTuple(slot);
