Hi, On 2023-04-06 18:15:14 -0700, Andres Freund wrote: > I think it might be worth having a C test for some of the bufmgr.c API. Things > like testing that retrying a failed relation extension works the second time > round.
A few hours after this I hit a stupid copy-pasto (21d7c05a5cf) that would hopefully have been uncovered by such a test... I guess we could even test this specific instance without a more complicated framework. Create table with some data, rename the file, checkpoint - should fail, rename back, checkpoint - should succeed. It's much harder to exercise the error paths inside the backend extending the relation unfortunately, because we require the file to be opened rw before doing much. And once the FD is open, removing the permissions doesn't help. The least complicated approach I scan see is creating directory qutoas, but that's quite file system specific... Greetings, Andres Freund