# View README.pg_filedump first
# note this must match version macros in pg_filedump.h
-FD_VERSION=9.3.0
+FD_VERSION=9.5.0
CC=gcc
CFLAGS=-g -O -Wall -Wmissing-prototypes -Wmissing-declarations
all: pg_filedump
pg_filedump: pg_filedump.o
- ${CC} ${CFLAGS} -o pg_filedump pg_filedump.o
+ ${CC} ${CFLAGS} -o pg_filedump pg_filedump.o -lpgport
pg_filedump.o: pg_filedump.c
${CC} ${CFLAGS} -I${PGSQL_INCLUDE_DIR} pg_filedump.c -c
#include "pg_filedump.h"
-#include "utils/pg_crc_tables.h"
+#include <utils/pg_crc.h>
/* checksum_impl.h uses Assert, which doesn't work outside the server */
#undef Assert
strcat(flagString, "SPLITEND|");
if (btreeSection->btpo_flags & BTP_HAS_GARBAGE)
strcat(flagString, "HASGARBAGE|");
+ if (btreeSection->btpo_flags & BTP_INCOMPLETE_SPLIT)
+ strcat(flagString, "INCOMPLETESPLIT|");
if (strlen(flagString))
flagString[strlen(flagString) - 1] = '\0';
strcat(flagString, "LIST|");
if (ginSection->flags & GIN_LIST_FULLROW)
strcat(flagString, "FULLROW|");
+ if (ginSection->flags & GIN_INCOMPLETE_SPLIT)
+ strcat(flagString, "INCOMPLETESPLIT|");
+ if (ginSection->flags & GIN_COMPRESSED)
+ strcat(flagString, "COMPRESSED|");
if (strlen(flagString))
flagString[strlen(flagString) - 1] = '\0';
printf(" GIN Index Section:\n"
char *dbState;
/* Compute a local copy of the CRC to verify the one on disk */
- INIT_CRC32(crcLocal);
- COMP_CRC32(crcLocal, buffer, offsetof(ControlFileData, crc));
- FIN_CRC32(crcLocal);
+ INIT_CRC32C(crcLocal);
+ COMP_CRC32C(crcLocal, buffer, offsetof(ControlFileData, crc));
+ FIN_CRC32C(crcLocal);
/* Grab a readable version of the database state */
switch (controlData->state)
case DB_SHUTDOWNED:
dbState = "SHUTDOWNED";
break;
+ case DB_SHUTDOWNED_IN_RECOVERY:
+ dbState = "SHUTDOWNED_IN_RECOVERY";
+ break;
case DB_SHUTDOWNING:
dbState = "SHUTDOWNING";
break;
" Maximum Index Keys: %u\n"
" TOAST Chunk Size: %u\n"
" Date and Time Type Storage: %s\n\n",
- EQ_CRC32(crcLocal,
+ EQ_CRC32C(crcLocal,
controlData->crc) ? "Correct" : "Not Correct",
controlData->pg_control_version,
(controlData->pg_control_version == PG_CONTROL_VERSION ?