Upgrading to GitLab 12.0.2.

Commit cced3a32 authored by Christoph Berg's avatar Christoph Berg

New upstream version 11.0

parent be7dadff
# View README.pg_filedump first
# note this must match version macros in pg_filedump.h
FD_VERSION=10.1
FD_VERSION=11.0
PROGRAM = pg_filedump
OBJS = pg_filedump.o decode.o stringinfo.o pg_lzcompress.o
......
......@@ -161,13 +161,13 @@ static ParseCallbackTableItem callback_table[] =
/* internally all string types are stored the same way */
{
"charN", &decode_string
"charn", &decode_string
},
{
"varchar", &decode_string
},
{
"varcharN", &decode_string
"varcharn", &decode_string
},
{
"text", &decode_string
......
......@@ -642,16 +642,15 @@ GetOptionValue(char *optionString)
unsigned int
GetBlockSize(FILE *fp)
{
unsigned int pageHeaderSize = sizeof(PageHeaderData);
unsigned int localSize = 0;
int bytesRead = 0;
char localCache[pageHeaderSize];
char localCache[sizeof(PageHeaderData)];
/* Read the first header off of block 0 to determine the block size */
bytesRead = fread(&localCache, 1, pageHeaderSize, fp);
bytesRead = fread(&localCache, 1, sizeof(PageHeaderData), fp);
rewind(fp);
if (bytesRead == pageHeaderSize)
if (bytesRead == sizeof(PageHeaderData))
localSize = (unsigned int) PageGetPageSize(&localCache);
else
{
......@@ -1733,7 +1732,9 @@ FormatControl(char *buffer)
" State: %s\n"
" Last Mod Time: %s"
" Last Checkpoint Record: Log File (%u) Offset (0x%08x)\n"
#if PG_VERSION_NUM < 110000
" Previous Checkpoint Record: Log File (%u) Offset (0x%08x)\n"
#endif
" Last Checkpoint Record Redo: Log File (%u) Offset (0x%08x)\n"
" |- TimeLineID: %u\n"
" |- Next XID: %u/%u\n"
......@@ -1761,7 +1762,9 @@ FormatControl(char *buffer)
dbState,
ctime(&(cd_time)),
(uint32) (controlData->checkPoint >> 32), (uint32) controlData->checkPoint,
#if PG_VERSION_NUM < 110000
(uint32) (controlData->prevCheckPoint >> 32), (uint32) controlData->prevCheckPoint,
#endif
(uint32) (checkPoint->redo >> 32), (uint32) checkPoint->redo,
checkPoint->ThisTimeLineID,
checkPoint->nextXidEpoch, checkPoint->nextXid,
......
......@@ -22,8 +22,8 @@
* Original Author: Patrick Macdonald <patrickm@redhat.com>
*/
#define FD_VERSION "10.1" /* version ID of pg_filedump */
#define FD_PG_VERSION "PostgreSQL 10.x" /* PG version it works with */
#define FD_VERSION "11.0" /* version ID of pg_filedump */
#define FD_PG_VERSION "PostgreSQL 11.x" /* PG version it works with */
#include "postgres.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment