Skip to content

Commit 78b3af5

Browse files
author
Grigory Smolkin
committed
PG17 support
1 parent 201c76f commit 78b3af5

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ do_add_instance(InstanceState *instanceState, InstanceConfig *instance)
6969
if (instance->server_major_version >= 11)
7070
instance->xlog_seg_size = ControlFile->xlog_seg_size;
7171
else
72-
instance->xlog_seg_size = XLOG_SEG_SIZE;
72+
instance->xlog_seg_size = DEFAULT_XLOG_SEG_SIZE;
7373

7474
/* Ensure that all root directories already exist */
7575
/* TODO maybe call do_init() here instead of error?*/

src/pg_probackup.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ extern const char *PROGRAM_EMAIL;
134134
#define TC_CYAN_BOLD "\033[1;36m"
135135
#define TC_RESET "\033[0m"
136136

137+
#ifndef DEFAULT_XLOG_SEG_SIZE
138+
#define DEFAULT_XLOG_SEG_SIZE (16*1024*1024)
139+
#endif
140+
137141
typedef struct RedoParams
138142
{
139143
TimeLineID tli;

src/show.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,22 +202,22 @@ pretty_size(int64 size, char *buf, size_t len)
202202
return;
203203
}
204204

205-
if (Abs(size) < limit)
205+
if (llabs(size) < limit)
206206
snprintf(buf, len, "%dB", (int) size);
207207
else
208208
{
209209
size >>= 9;
210-
if (Abs(size) < limit2)
210+
if (llabs(size) < limit2)
211211
snprintf(buf, len, "%dkB", (int) half_rounded(size));
212212
else
213213
{
214214
size >>= 10;
215-
if (Abs(size) < limit2)
215+
if (llabs(size) < limit2)
216216
snprintf(buf, len, "%dMB", (int) half_rounded(size));
217217
else
218218
{
219219
size >>= 10;
220-
if (Abs(size) < limit2)
220+
if (llabs(size) < limit2)
221221
snprintf(buf, len, "%dGB", (int) half_rounded(size));
222222
else
223223
{

0 commit comments

Comments
 (0)