On Mon, Apr 19, 2021 at 01:55:13PM -0400, Robert Haas wrote: > I've noticed that customers not infrequently complain that they start > postgres and then the system doesn't come up for a while and they have > no idea what's going on and are (understandably) worried. There are > probably a number of reasons why this can happen, but the ones that > seem to come up most often in my experience are (1) SyncDataDirectory > takes a long time, (b) ResetUnloggedRelations takes a long time, and > (c) there's a lot of WAL to apply so that takes a long time. It's > possible to distinguish this last case from the other two by looking > at the output of 'ps', but that's not super-convenient if your normal > method of access to the server is via libpq, and it only works if you > are monitoring it as it's happening rather than looking at the logs > after-the-fact. I am not sure there's any real way to distinguish the > other two cases without using strace or gdb or similar. > > It seems to me that we could do better. One approach would be to try > to issue a log message periodically - maybe once per minute, or some > configurable interval, e.g. perhaps add messages something like this:
Yes, this certainly needs improvement. -- Bruce Momjian <br...@momjian.us> https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.