Skip site navigation (1) Skip section navigation (2)

Re: About the pid and opts files

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: peter_e(at)gmx(dot)net
Cc: t-ishii(at)sra(dot)co(dot)jp, pgsql-hackers(at)postgresql(dot)org
Subject: Re: About the pid and opts files
Date: 2000-06-24 03:22:10
Message-ID: 20000624122210S.t-ishii@sra.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackers
> I'm making consistent accessor functions to all of the special file names
> used in the backend (e.g., "pg_hba.conf", "pg_control", etc.) and I got to
> the pid file stuff. I'm wondering why you call the SetPidFile and
> SetOptsFile functions twice, once in pmdaemonize() and once in the
> non-detach case. It seems to me that you would get the same thing if you
> just did:
> 
> if (silentflag)
>     pmdaemonize(); /* old version */
> 
> SetPidFile(...);
> on_proc_exit(UnlinkPidFile, NULL);
> SetOptsFile(...);
> 
> Is there anything special you wanted to achieve with this?

Becasue errors on creating the pid file and the opts file are
critical, I wanted to print error messages to stdout/stderr. After
detaching ttys, it would be impossible.

> Furthermore, with the new run-time configuration system there will be a
> fairly volatile set of possible options to the postmaster (and perhaps
> more importantly, not all options are necessarily from the command line),
> so the SetOptsFile function will need some rework. I think instead of
> teaching SetOptsFile about each option that the postmaster might accept we
> could just do
> 
> for (i=1; i<argc; i++)
> {
>     fprintf(opts_file, "'%s' ", argv[i]);
> }
> 
> The result wouldn't look as pretty as it does now but at least it would
> always be correct. Comments?

Yes, the new run-time configuration system should simplify
SetOptsFile. But before proceeding further, I would like to learn more
about it. i.e. what kind of application interfaces are provided? Do
shell scripts such as pg_ctl can use it? Is there any documentation?
--
Tatsuo Ishii


In response to

Responses

pgsql-hackers by date

Next:From: Thomas LockhartDate: 2000-06-24 03:22:31
Subject: Re: 64-bit sequences
Previous:From: Brian P. MannDate: 2000-06-23 22:04:31
Subject: Re: query failed , don't know why

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group