Open paoloantinori opened 10 years ago
Thank you very much for reporting this. I can't reproduce this on my environments, so please give this a try and let me know if it fixes it.
@paoloantinori @Painted-Fox Thanks for referencing me. I think I should have created PR, but I though it was only my environment being weird.
No problem, @waterlink. I try to give credit where it's due.
Working well now for me!
Thank you!
@paoloantinori Thank you for reporting and verifying!
I took this fix out, so this issue might be back. I was getting into an infinite loop, so I'm going to need to find a more elegant way to fix this.
@Painted-Fox recently I had similar problem with other rdbms and solved it by using linux watch
utility
something like: watch -e "! $COMMAND_TO_CREATE_USER" <>/dev/null
. This will try to execute command each 2 seconds and will exit once it is a success.
Hi, I want to report a problem that happens on my system but not on a constant base.
Sometimes the scripts are not creating correctly the user.
I have tracked down the reason of the problem to this script
Apparently the presence of
/run/postgresql/9.3-main.pid
is not enough to identify Postgres as ready to accept connections.I have random error and logs shows that
post_start_action
before all the startup log entries are displayed.I have also notice that the logic in this fork https://github.com/waterlink/docker-postgresql/blob/master/scripts/first_run.sh helps to avoid the problem.
Could you consider to change the "wait" logic?