Re: [PATCHES] [COMMITTERS] pgsql-server/src backend/main/main.c backend/p ...

2004-05-19 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: [EMAIL PROTECTED] (Bruce Momjian) writes: Remove elog() calls from find_my_exec; do fprintf(stderr) instead. Isn't that a seriously bad idea? Yes, it probably is bad, but I am not sure how frequently this will

Re: [PATCHES] [COMMITTERS] pgsql-server/src backend/main/main.c backend/p ...

2004-05-19 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: so it has to be earlier. I can put it much earlier in both postgres and postmaster, but by having it in main.c, I have it in only one place. It doesn't do any palloc or anything fancy, because of course it is also used by client apps. Patch attached

Re: [PATCHES] [COMMITTERS] pgsql-server/src backend/main/main.c backend/p ...

2004-05-19 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: so it has to be earlier. I can put it much earlier in both postgres and postmaster, but by having it in main.c, I have it in only one place. It doesn't do any palloc or anything fancy, because of course it is also used by client

Re: [PATCHES] [COMMITTERS] pgsql-server/src backend/main/main.c backend/p ...

2004-05-19 Thread Magnus Hagander
so it has to be earlier. I can put it much earlier in both postgres and postmaster, but by having it in main.c, I have it in only one place. It doesn't do any palloc or anything fancy, because of course it is also used by client apps. Patch attached and applied. And

Re: [PATCHES] [COMMITTERS] pgsql-server/src backend/main/main.c backend/p ...

2004-05-19 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: And tested? I didn't say that I thought elog would work in main.c. In fact I'm pretty certain it won't. Compiles/regression tests pass. You need to test the cases that will produce elog output. This is why I removed elog in the

Re: [PATCHES] [COMMITTERS] pgsql-server/src backend/main/main.c backend/p

2004-05-19 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: And tested? I didn't say that I thought elog would work in main.c. In fact I'm pretty certain it won't. Compiles/regression tests pass. You need to test the cases that will produce elog output. This is why

Re: [PATCHES] [COMMITTERS] pgsql-server/src backend/main/main.c backend/p

2004-05-19 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: OK, I moved the find_my_exec calls to the locations you mentioned in both postgres.c and postmaster.c and remove it from main.c. I tested the elog and it worked. You omitted get_pkglib_path() from the postmaster case; was that

Re: [PATCHES] [COMMITTERS] pgsql-server/src backend/main/main.c backend/p

2004-05-19 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: Also, in the non-exec case it seems unnecessary and possibly unsafe to repeat this computation in a backend. Thanks. It originally was as below and I forgot about that. It now is: if (my_exec_path[0] == '\0' find_my_exec(argv[0],