MCPcopy Create free account
hub / github.com/apache/cloudberry / tar_write_padding_data

Function tar_write_padding_data

src/bin/pg_basebackup/walmethods.c:599–617  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

597}
598
599static bool
600tar_write_padding_data(TarMethodFile *f, size_t bytes)
601{
602 PGAlignedXLogBlock zerobuf;
603 size_t bytesleft = bytes;
604
605 memset(zerobuf.data, 0, XLOG_BLCKSZ);
606 while (bytesleft)
607 {
608 size_t bytestowrite = Min(bytesleft, XLOG_BLCKSZ);
609 ssize_t r = tar_write(f, zerobuf.data, bytestowrite);
610
611 if (r < 0)
612 return false;
613 bytesleft -= r;
614 }
615
616 return true;
617}
618
619static char *
620tar_get_file_name(const char *pathname, const char *temp_suffix)

Callers 2

tar_open_for_writeFunction · 0.85
tar_closeFunction · 0.85

Calls 1

tar_writeFunction · 0.85

Tested by

no test coverage detected