Set progname early in the postmaster/postgres binary, rather than doing

Bruce Momjian <bruce@momjian.us>

Commit: 5eb493ab980938aecf87feeda810183ef2b3c612
Author: Bruce Momjian <bruce@momjian.us>
Date: 2006-02-01T00:47:03Z
Releases: 8.0.7
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

PathChange+/−
src/backend/main/main.c modified +4 −2
src/backend/postmaster/postmaster.c modified +1 −7
src/include/postmaster/postmaster.h modified +2 −1
src/port/path.c modified +18 −17