Re: pg_upgrade fails with in-place tablespace

Поиск
Список
Период
Сортировка
От Rui Zhao
Тема Re: pg_upgrade fails with in-place tablespace
Дата
Msg-id 0fdb4f37-7325-42ab-b465-b9201400724a.xiyuan.zr@alibaba-inc.com
обсуждение исходный текст
Ответ на Re: pg_upgrade fails with in-place tablespace  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pg_upgrade fails with in-place tablespace
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: pg15: reltuples stuck at -1 after pg_upgrade and VACUUM
Следующее
От: Junwang Zhao
Дата:
Сообщение: [BackendXidGetPid] only access allProcs when xid matches