You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
walmethods.c/h: Make Walfile a struct, rather than a void *
This makes the curent file position and pathname visible in a genericway, so we no longer need current_walfile_name global variable or theget_current_pos() method. Since that purported to be able to fail butnever actually did, this also lets us get rid of some unnecessaryerror-handling code.One risk of this change is that the get_current_pos() methodpreviously cleared the error indicator, and that will no longer happenwith the new approach. I looked for a way that this could cause problemsand did not find one.The previous code was confused about whether "Walfile" was theimplementation-dependent structure representing a WAL file orwhether it was a pointer to that stucture. Some of the code used itone way, and some in the other. The compiler tolerated that becausevoid * is interchangeable with void **, but now that Walfile is astruct, it's necessary to be consistent. Hence, some references to"Walfile" have been converted to "Walfile *".Discussion:http://postgr.es/m/CA+TgmoZS0Kw98fOoAcGz8B9iDhdqB4Be4e=vDZaJZ5A-xMYBqA@mail.gmail.com