On Mon, 19 Dec 2022 at 22:40, Maxim Orlov <orlo...@gmail.com> wrote:
> Hi!
>
> As a result of discussion in the thread [0], Robert Haas proposed to focus
> on making SLRU 64 bit, as a first step towards 64 bit XIDs.
> Here is the patch set.
>
> In overall, code of this patch set is based on the existing code from [0]
> and may be simplified, due to the fact, that SLRU_PAGES_PER_SEGMENT is not
> meant to be changed now.
> But I decided to leave it that way. At least for now.
>
> As always, reviews and opinions are very welcome.
>

For v51-0003. We can use GetClogDirName instead of GET_MAJOR_VERSION in
copy_subdir_files().

diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c
index 1c49c63444..3934978b97 100644
--- a/src/bin/pg_upgrade/pg_upgrade.c
+++ b/src/bin/pg_upgrade/pg_upgrade.c
@@ -857,10 +857,7 @@ copy_xact_xlog_xid(void)
                pfree(new_path);
        }
        else
-               copy_subdir_files(GET_MAJOR_VERSION(old_cluster.major_version) 
<= 906 ?
-                                                 "pg_clog" : "pg_xact",
-                                                 
GET_MAJOR_VERSION(new_cluster.major_version) <= 906 ?
-                                                 "pg_clog" : "pg_xact");
+               copy_subdir_files(GetClogDirName(old_cluster), 
GetClogDirName(new_cluster));
 
        prep_status("Setting oldest XID for new cluster");
        exec_prog(UTILITY_LOG_FILE, NULL, true, true,

-- 
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.


Reply via email to