Re: pg_ftruncate hardcodes length=0 but only under windows
On Fri, Jan 6, 2023 at 4:16 PM Justin Pryzby wrote: > - ret = ftruncate(fd, 0); > + ret = ftruncate(fd, length); Oops. Right. Thanks, pushed.
pg_ftruncate hardcodes length=0 but only under windows
57faaf376 added pg_truncate(const char *path, off_t length), but "length" is ignored under WIN32 and the file is unconditionally truncated to 0. There's no live bug, since the only caller passes 0: | src/backend/storage/smgr/md.c: ret = pg_truncate(path, 0); But I guess extension users could be