Re: Question on start server using PG_CTL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Mark Steben" <msteben@xxxxxxxxxxxxxxx> writes:
> Is it possible that, during startup, postmaster.pid takes a second or two to
> be created and hadn't been created yet when the test was run? 

It's not instantaneous, for sure.  For one thing, the kernel could be
scheduling the postmaster at lower priority than the continued execution
of your startup script.  If you don't have any sleep at all in there
then the risk of failure would be quite high, even assuming the
postmaster would create the pidfile instantaneously once it gets to run.
And there are other things it has to do first, like read the config file
so it knows where the data directory is ...

Since you say you're using pg_ctl, why don't you use its -w option and
not let the script proceed until you know the postmaster is up?

			regards, tom lane

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux