You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Put this before pg_ctl fast stop. May be this part should skipped or run using an environment variable...
echo "Waiting for Postgres autovacuum to start..."
CHECK=$(psql -U postgres link -t -c "select count(pid) from pg_stat_activity where backend_type='autovacuum worker'")
until [ ${CHECK} != 0 ]
do
sleep 15
CHECK=$(psql -U postgres link -t -c "select count(pid) from pg_stat_activity where backend_type='autovacuum worker'")
done
echo "Postgres autovacuum is running... waiting for it to complete.. may take while"
until [ ${CHECK} == 0 ]
do
sleep 15
CHECK=$(psql -U postgres link -t -c "select count(pid) from pg_stat_activity where backend_type='autovacuum worker'")
done
echo "Postgres autovacuum complete. Database can be shut down."
The text was updated successfully, but these errors were encountered:
That code isn't part of our image. If you want that code to run as part of your image, you should be able to drop it into /docker-entrypoint-initdb.d and have it run as you desire. If that's not flexible enough, #496 is going to be your best bet for customizing the entrypoint further.
Exactly the point.
I submitted some lines of script to solve that problem and my comment was that this piece of script could be bypassed by a switch….
But point taken. Thanks for your comment.
Thorleif
3. jul. 2019 kl. 02:10 skrev Tianon Gravi ***@***.***>:
That code isn't part of our image. If you want that code to run as part of your image, you should be able to drop it into /docker-entrypoint-initdb.d and have it run as you desire. If that's not flexible enough, #496 <#496> is going to be your best bet for customizing the entrypoint further.
In the future, these sorts of questions/requests would be more appropriately posted to the Docker Community Forums <https://forums.docker.com/>, the Docker Community Slack <https://dockr.ly/slack>, or Stack Overflow <https://stackoverflow.com/search?tab=newest&q=docker>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#595?email_source=notifications&email_token=AG2G7WTFOJGFETBWCWR4DCTP5PU7TA5CNFSM4H3522R2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZC4JOQ#issuecomment-507888826>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AG2G7WTYNGKJ3LFNO26CQ73P5PU7TANCNFSM4H3522RQ>.
Put this before pg_ctl fast stop. May be this part should skipped or run using an environment variable...
echo "Waiting for Postgres autovacuum to start..."
CHECK=$(psql -U postgres link -t -c "select count(pid) from pg_stat_activity where backend_type='autovacuum worker'")
until [ ${CHECK} != 0 ]
do
sleep 15
CHECK=$(psql -U postgres link -t -c "select count(pid) from pg_stat_activity where backend_type='autovacuum worker'")
done
echo "Postgres autovacuum is running... waiting for it to complete.. may take while"
until [ ${CHECK} == 0 ]
do
sleep 15
CHECK=$(psql -U postgres link -t -c "select count(pid) from pg_stat_activity where backend_type='autovacuum worker'")
done
echo "Postgres autovacuum complete. Database can be shut down."
The text was updated successfully, but these errors were encountered: