Set progname early in the postmaster/postgres binary, rather than doing
Bruce Momjian <bruce@momjian.us>
Set progname early in the postmaster/postgres binary, rather than doing it later. This fixes a problem where EXEC_BACKEND didn't have progname set, causing a segfault if log_min_messages was set below debug2 and our own snprintf.c was being used. Also alway strdup() progname. Backpatch to 8.1.X and 8.0.X.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/main/main.c | modified | +5 −3 |
| src/backend/postmaster/postmaster.c | modified | +1 −7 |
| src/include/postmaster/postmaster.h | modified | +2 −1 |
| src/port/path.c | modified | +17 −16 |