I have found the patch and upon review, I believe the following code can be improved.
+ /*
+ * In-place tablespaces use a relative path, and need to be dumped
+ * with an empty string as location.
+ */
+ if (is_absolute_path(spclocation))
+ appendStringLiteralConn(buf, spclocation, conn);
+ else
+ appendStringLiteralConn(buf, "", conn);
I believe that utilizing appendPQExpBufferStr(buf, "''"); would be better and more meaningful than using appendStringLiteralConn(buf, "", conn); in this scenario.
I apologize for this wrong usage. Please help me fix it.
I will try to respond to pg_upgrade after my deep dive.
--
Best regards,
Rui Zhao