Pavel Borisov <pashkin.e...@gmail.com> writes: > I see the proposed patch as uncontroversial and good enough to be > committed. It will make the code a little clearer. Personally, I don't like > leaving functions that are just wrappers for another and called only once.
Yeah, I like this for a different reason: just a couple days ago I was comparing the postmaster's startup sequence to that used in standalone mode (in postgres.c) and was momentarily confused because one had reset_shared() where the other had CreateSharedMemoryAndSemaphores(). Looking in our git history, it seems that reset_shared() used to embed slightly more knowledge, but it sure looks pretty pointless now. > But I think that if there's a question of code readability it's not bad to > restore the comments on the purpose of a call that were originally in the > code. Actually I think you chose the wrong place to move the comment to. It applies to the initial postmaster start, because what it's pointing out is that we'll probably choose the same IPC keys as any previous run did. If we felt the need to enforce that during a crash restart, we surely could do so directly. Pushed after fiddling with the comments. regards, tom lane