aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execMain.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2022-09-19 11:20:18 -0400
committerRobert Haas <rhaas@postgresql.org>2022-09-19 11:20:18 -0400
commit4fd14794945e60c4aedad84b06ff1e2a7a6236f0 (patch)
treeed3044058c920730d02b46db9392d41ea426820a /src/backend/executor/execMain.c
parent1fe1d09652d796392785922bef54e0ffda6e1f05 (diff)
downloadpostgresql-4fd14794945e60c4aedad84b06ff1e2a7a6236f0.tar.gz
postgresql-4fd14794945e60c4aedad84b06ff1e2a7a6236f0.zip
walmethods.c/h: Make Walfile a struct, rather than a void *
This makes the curent file position and pathname visible in a generic way, so we no longer need current_walfile_name global variable or the get_current_pos() method. Since that purported to be able to fail but never actually did, this also lets us get rid of some unnecessary error-handling code. One risk of this change is that the get_current_pos() method previously cleared the error indicator, and that will no longer happen with the new approach. I looked for a way that this could cause problems and did not find one. The previous code was confused about whether "Walfile" was the implementation-dependent structure representing a WAL file or whether it was a pointer to that stucture. Some of the code used it one way, and some in the other. The compiler tolerated that because void * is interchangeable with void **, but now that Walfile is a struct, 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
Diffstat (limited to 'src/backend/executor/execMain.c')
0 files changed, 0 insertions, 0 deletions