pg_healer
pg_healer copied to clipboard
I can't install pg_healer getting an error
$ make install
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -g -g -O2 -fdebug-prefix-map=/build/postgresql-10-QwtiCa/postgresql-10-10.12=. -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -fPIC -I. -I./ -I/usr/include/postgresql/10/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5 -c -o pg_healer.o pg_healer.c
pg_healer.c: In function ‘pg_healer_checksum’:
pg_healer.c:72:38: warning: passing argument 1 of ‘pg_checksum_block’ from incompatible pointer type [-Wincompatible-pointer-types]
actual_checksum = pg_checksum_block(page, BLCKSZ);
^~~~
In file included from pg_healer.c:24:0:
/usr/include/postgresql/10/server/storage/checksum_impl.h:146:1: note: expected ‘const PGChecksummablePage * {aka const union <anonymous> *}’ but argument is of type ‘char *’
pg_checksum_block(const PGChecksummablePage *page)
^~~~~~~~~~~~~~~~~
pg_healer.c:72:20: error: too many arguments to function ‘pg_checksum_block’
actual_checksum = pg_checksum_block(page, BLCKSZ);
^~~~~~~~~~~~~~~~~
In file included from pg_healer.c:24:0:
/usr/include/postgresql/10/server/storage/checksum_impl.h:146:1: note: declared here
pg_checksum_block(const PGChecksummablePage *page)
^~~~~~~~~~~~~~~~~
pg_healer.c: In function ‘pg_healer_repair_external’:
pg_healer.c:471:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(ext_pageBuffer, BLCKSZ, 1, ext_fh);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pg_healer.c: In function ‘pg_healer_repair_path’:
pg_healer.c:626:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(pageBuffer, BLCKSZ, 1, fh);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<builtin>: recipe for target 'pg_healer.o' failed
make: *** [pg_healer.o] Error 1
Hi, has there ever been any answer or solution to your question? The problem persists with newer versions (and even older) versions of PG.
KR Dennis
Hi, awaiting response too