Thread: pgsql: Move code for backend startup to separate file
Move code for backend startup to separate file This is code that runs in the backend process after forking, rather than postmaster. Move it out of postmaster.c for clarity. Reviewed-by: Tristan Partin, Andres Freund Discussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/05c3980e7f473ac2061dad9bbb7a9f0ede0279d9 Modified Files -------------- src/backend/postmaster/launch_backend.c | 1 + src/backend/postmaster/postmaster.c | 762 +------------------------------ src/backend/tcop/Makefile | 1 + src/backend/tcop/backend_startup.c | 778 ++++++++++++++++++++++++++++++++ src/backend/tcop/meson.build | 1 + src/include/postmaster/postmaster.h | 4 +- src/include/tcop/backend_startup.h | 41 ++ 7 files changed, 829 insertions(+), 759 deletions(-)
Hi Heikki, (Peter E. in CC.) On Mon, Mar 18, 2024 at 09:40:36AM +0000, Heikki Linnakangas wrote: > Move code for backend startup to separate file > > This is code that runs in the backend process after forking, rather > than postmaster. Move it out of postmaster.c for clarity. > > Reviewed-by: Tristan Partin, Andres Freund > Discussion: https://www.postgresql.org/message-id/7a59b073-5b5b-151e-7ed3-8b01ff7ce9ef@iki.fi --- a/src/include/postmaster/postmaster.h +++ b/src/include/postmaster/postmaster.h @@ -52,6 +52,8 @@ extern PGDLLIMPORT int postmaster_alive_fds[2]; extern PGDLLIMPORT const char *progname; +extern bool LoadedSSL; This variable is missing a PGDLLIMPORT, it seems. aafc05de1bf5 has missed a second one with MyClientSocket. Both are declared in postmaster.h. The credit goes to Peter Eisentraunt for noticing these two who has mentioned that to me on mastodon, while I am not able to parse correctly a set of diffs. This stuff can be spotted with a command like this one: src/tools/mark_pgdllimport.pl $(git ls-files *.h) Thanks, -- Michael
Attachment
On Mon, Apr 15, 2024 at 05:24:39PM +0900, Michael Paquier wrote: > extern PGDLLIMPORT const char *progname; > > +extern bool LoadedSSL; > > This variable is missing a PGDLLIMPORT, it seems. > > aafc05de1bf5 has missed a second one with MyClientSocket. Both are > declared in postmaster.h. For now, I've fixed these two with 768ceeeaa127. -- Michael