Alvaro Herrera Munoz <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> strace'ing the postmaster suggested me that the dbname string in
> utils/init/postinit.c, the InitPostgres function, is the culprit.
> In fact, if I apply the following patch to tcop/postgres.c the
> whole thing stops happening.
> else if (argc - optind == 1)
> ! dbname = argv[optind];
> ...
> else if (argc - optind == 1)
> ! dbname = pstrdup(argv[optind]);
Surely this is a red herring --- that code path does not even execute
except in the case of a standalone backend.
regards, tom lane