walmethods.c used off_t to navigate around a pg_wal.tar file that could
exceed 2GB, which doesn't work on Windows and would fail with misleading
errors. Use pgoff_t instead.
Back-patch to all supported branches.
Author: Davinder Singh <
[email protected]>
Reported-by: Jakub Wartak <[email protected]>
Discussion: https://postgr.es/m/CAKZiRmyM4YnokK6Oenw5JKwAQ3rhP0YTz2T-tiw5dAQjGRXE3Q%40mail.gmail.com
close_walfile(StreamCtl *stream, XLogRecPtr pos)
{
char *fn;
- off_t currpos;
+ pgoff_t currpos;
int r;
char walfile_name[MAXPGPATH];
typedef struct TarMethodFile
{
Walfile base;
- off_t ofs_start; /* Where does the *header* for this file start */
+ pgoff_t ofs_start; /* Where does the *header* for this file start */
char header[TAR_BLOCK_SIZE];
size_t pad_to_size;
} TarMethodFile;
typedef struct
{
WalWriteMethod *wwmethod;
- off_t currpos;
+ pgoff_t currpos;
char *pathname;
/*