Skip to content

Commit af99fe4

Browse files
committed
ptrack_enable fix
1 parent 9813471 commit af99fe4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/backup.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,9 +598,9 @@ do_backup_instance(void)
598598

599599
if (ptrack_lsn > prev_backup->stop_lsn)
600600
{
601-
elog(ERROR, "LSN from ptrack_control %lx differs from LSN of previous backup %lx.\n"
601+
elog(ERROR, "LSN from ptrack_control %lx differs from STOP LSN of previous backup %lx.\n"
602602
"Create new full backup before an incremental one.",
603-
ptrack_lsn, prev_backup->start_lsn);
603+
ptrack_lsn, prev_backup->stop_lsn);
604604
}
605605
parray_qsort(backup_files_list, pgFileComparePath);
606606
make_pagemap_from_ptrack(backup_files_list);
@@ -782,14 +782,17 @@ do_backup(void)
782782
current.stream = stream_wal;
783783

784784
is_ptrack_support = pg_ptrack_support();
785+
if (is_ptrack_support)
786+
{
787+
is_ptrack_enable = pg_ptrack_enable();
788+
}
785789

786790
if (current.backup_mode == BACKUP_MODE_DIFF_PTRACK)
787791
{
788792
if (!is_ptrack_support)
789793
elog(ERROR, "This PostgreSQL instance does not support ptrack");
790794
else
791795
{
792-
is_ptrack_enable = pg_ptrack_enable();
793796
if(!is_ptrack_enable)
794797
elog(ERROR, "Ptrack is disabled");
795798
}

0 commit comments

Comments
 (0)