Skip to content

Commit 50cb6f7

Browse files
committed
Merge branch 'remote_ssh' of git.postgrespro.ru:pgpro-dev/pg_probackup into remote_ssh
2 parents ddf2b9b + 5f7aed0 commit 50cb6f7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/walmethods.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#endif
2323

2424
#include "pgtar.h"
25-
#include "common/file_perm.h"
2625
#include "common/file_utils.h"
2726

2827
#include "receivelog.h"
@@ -120,14 +119,14 @@ dir_open_for_write(const char *pathname, const char *temp_suffix, size_t pad_to_
120119
/* Do pre-padding on non-compressed files */
121120
if (pad_to_size && dir_data->compression == 0)
122121
{
123-
PGAlignedXLogBlock zerobuf;
124-
int bytes;
122+
char zerobuf[XLOG_BLCKSZ];
123+
int bytes;
125124

126-
memset(zerobuf.data, 0, XLOG_BLCKSZ);
125+
memset(zerobuf, 0, XLOG_BLCKSZ);
127126
for (bytes = 0; bytes < pad_to_size; bytes += XLOG_BLCKSZ)
128127
{
129128
errno = 0;
130-
if (fio_write(fd, zerobuf.data, XLOG_BLCKSZ) != XLOG_BLCKSZ)
129+
if (fio_write(fd, zerobuf, XLOG_BLCKSZ) != XLOG_BLCKSZ)
131130
{
132131
int save_errno = errno;
133132

0 commit comments

Comments
 (0)