mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-03-30 23:04:31 +02:00
Provide compatibility with older Postgres versions
This commit is contained in:
parent
f9a0ae971c
commit
5f7aed02b2
@ -119,14 +119,14 @@ dir_open_for_write(const char *pathname, const char *temp_suffix, size_t pad_to_
|
||||
/* Do pre-padding on non-compressed files */
|
||||
if (pad_to_size && dir_data->compression == 0)
|
||||
{
|
||||
PGAlignedXLogBlock zerobuf;
|
||||
int bytes;
|
||||
char zerobuf[XLOG_BLCKSZ];
|
||||
int bytes;
|
||||
|
||||
memset(zerobuf.data, 0, XLOG_BLCKSZ);
|
||||
memset(zerobuf, 0, XLOG_BLCKSZ);
|
||||
for (bytes = 0; bytes < pad_to_size; bytes += XLOG_BLCKSZ)
|
||||
{
|
||||
errno = 0;
|
||||
if (fio_write(fd, zerobuf.data, XLOG_BLCKSZ) != XLOG_BLCKSZ)
|
||||
if (fio_write(fd, zerobuf, XLOG_BLCKSZ) != XLOG_BLCKSZ)
|
||||
{
|
||||
int save_errno = errno;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user