diff options
author | Daniel Gustafsson <dgustafsson@postgresql.org> | 2023-05-02 13:15:29 +0200 |
---|---|---|
committer | Daniel Gustafsson <dgustafsson@postgresql.org> | 2023-05-02 13:15:29 +0200 |
commit | 08237056f84e3a9ed75e8a698428c669f4d35db4 (patch) | |
tree | de2553f4f5e154f0011d32e678d6c1519ca3e211 /src/bin/pg_rewind/local_source.c | |
parent | e0bb5d0c5bcada63dc9b8a1a72a344a07bf930ce (diff) | |
download | postgresql-08237056f84e3a9ed75e8a698428c669f4d35db4.tar.gz postgresql-08237056f84e3a9ed75e8a698428c669f4d35db4.zip |
Fix overridden callbacks in pg_rewind.
The <source>_traverse_files functions take a callback for processing
files, but both the local and libpq source implementations called the
function directly without using the callback argument. While there is
no bug right now as the function called is the same as the callback,
fix by calling the callback to reduce the risk of subtle bugs in the
future.
Author: Junwang Zhao <zhjwpku@gmail.com>
Reviewed-by: Richard Guo <guofenglinux@gmail.com>
Discussion: https://postgr.es/m/CAEG8a3Jdwgh+PZr2zh1=t8apA4Yz8tKq+uubPqoCt14nvWKHEw@mail.gmail.com
Diffstat (limited to 'src/bin/pg_rewind/local_source.c')
-rw-r--r-- | src/bin/pg_rewind/local_source.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_rewind/local_source.c b/src/bin/pg_rewind/local_source.c index 4e2a1376c69..9bd43cba748 100644 --- a/src/bin/pg_rewind/local_source.c +++ b/src/bin/pg_rewind/local_source.c @@ -59,7 +59,7 @@ init_local_source(const char *datadir) static void local_traverse_files(rewind_source *source, process_file_callback_t callback) { - traverse_datadir(((local_source *) source)->datadir, &process_source_file); + traverse_datadir(((local_source *) source)->datadir, callback); } static char * |