Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5917671

Browse files
committed
pg_basebackup: Try to fix some failures on Windows.
Commitffd5365 messed up themechanism that was being used to pass parameters to LogStreamerMain()on Windows. It worked on Linux because only Windows was using threads.Repair by moving the additional parameters added by that commit intothe 'logstreamer_param' struct.Along the way, fix a compiler warning on builds without HAVE_LIBZ.Discussion:http://postgr.es/m/CA+TgmoY5=AmWOtMj3v+cySP2rR=Bt6EGyF_joAq4CfczMddKtw@mail.gmail.com
1 parent9d92582 commit5917671

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

‎src/backend/replication/basebackup_gzip.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,14 @@ const bbsink_ops bbsink_gzip_ops = {
6161
bbsink*
6262
bbsink_gzip_new(bbsink*next,bc_specification*compress)
6363
{
64-
intcompresslevel;
65-
6664
#ifndefHAVE_LIBZ
6765
ereport(ERROR,
6866
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
6967
errmsg("gzip compression is not supported by this build")));
7068
returnNULL;/* keep compiler quiet */
7169
#else
7270
bbsink_gzip*sink;
71+
intcompresslevel;
7372

7473
Assert(next!=NULL);
7574

‎src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,12 +541,12 @@ typedef struct
541541
charxlog[MAXPGPATH];/* directory or tarfile depending on mode */
542542
char*sysidentifier;
543543
inttimeline;
544+
WalCompressionMethodwal_compress_method;
545+
intwal_compress_level;
544546
}logstreamer_param;
545547

546548
staticint
547-
LogStreamerMain(logstreamer_param*param,
548-
WalCompressionMethodwal_compress_method,
549-
intwal_compress_level)
549+
LogStreamerMain(logstreamer_param*param)
550550
{
551551
StreamCtlstream;
552552

@@ -575,8 +575,8 @@ LogStreamerMain(logstreamer_param *param,
575575
stream.do_sync);
576576
else
577577
stream.walmethod=CreateWalTarMethod(param->xlog,
578-
wal_compress_method,
579-
wal_compress_level,
578+
param->wal_compress_method,
579+
param->wal_compress_level,
580580
stream.do_sync);
581581

582582
if (!ReceiveXlogStream(param->bgconn,&stream))
@@ -634,6 +634,8 @@ StartLogStreamer(char *startpos, uint32 timeline, char *sysidentifier,
634634
param=pg_malloc0(sizeof(logstreamer_param));
635635
param->timeline=timeline;
636636
param->sysidentifier=sysidentifier;
637+
param->wal_compress_method=wal_compress_method;
638+
param->wal_compress_level=wal_compress_level;
637639

638640
/* Convert the starting position */
639641
if (sscanf(startpos,"%X/%X",&hi,&lo)!=2)
@@ -724,7 +726,7 @@ StartLogStreamer(char *startpos, uint32 timeline, char *sysidentifier,
724726
intret;
725727

726728
/* in child process */
727-
ret=LogStreamerMain(param,wal_compress_method,wal_compress_level);
729+
ret=LogStreamerMain(param);
728730

729731
/* temp debugging aid to analyze 019_replslot_limit failures */
730732
if (verbose)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp