1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-19 23:22:23 +03:00

Commonalize process startup code.

Move common code, that was duplicated in every postmaster child/every
standalone process, into two functions in miscinit.c.  Not only does
that already result in a fair amount of net code reduction but it also
makes it much easier to remove more duplication in the future. The
prime motivation wasn't code deduplication though, but easier addition
of new common code.
This commit is contained in:
Andres Freund
2015-01-13 13:12:37 +01:00
parent 2be82dcf17
commit 31c453165b
15 changed files with 96 additions and 274 deletions

View File

@@ -277,6 +277,9 @@ extern int trace_recovery(int trace_level);
extern char *DatabasePath;
/* now in utils/init/miscinit.c */
extern void InitPostmasterChild(void);
extern void InitStandaloneProcess(const char *argv0);
extern void SetDatabasePath(const char *path);
extern char *GetUserNameFromId(Oid roleid);