Comments (6)
Looks correct to me.
from crunchy-containers.
combined the start-pg-wrapper.sh and start.sh scripts into a single start.sh script to be consistent other containers in the suite, added a change to start.sh script to exec postgres, this allows SIGTERM (docker stop) to reach postgres whereby a clean postgres shutdown can be achieved.
from crunchy-containers.
Converting SIGTERM to SIGINT is important. See:
https://www.postgresql.org/docs/9.5/static/server-shutdown.html
If you send SIGTERM, postgres will wait on any existing connections, which means it could wait a very long time. If that happens docker stop times out and postgres gets killed as before.
With SIGINT, a "fast shutdown" is done. This produces a clean shutdown while not waiting on existing connections. SIGINT is what we need here.
from crunchy-containers.
ah!
from crunchy-containers.
it appears to be working now..I put an explicit trap in the script to catch both INT and TERM
signals, when caught, it will send SIGINT to the postgres to stop it....
the pg log shows the following message to indicate the shutdown...
2016-11-02 11:52:33 EDT [27]: [4-1] user=,db=,app=,client=LOG: received fast shutdown request
from crunchy-containers.
Perfect -- thanks!
from crunchy-containers.
Related Issues (20)
- Where is the Dockerfile to build crunchy-postgres-exporter? HOT 1
- postgres-upgrade container doesn't include all versions of pgsql binaries HOT 3
- Why were the postgres-ha directories removed in v5.0.3? HOT 2
- ERRO Can't add file /var/lib/containers/storage/overlay/.... to tar: archive/tar: sockets not supported
- uid_daemon should identify itself as a bash script
- Postgres 14 missing from crunchy-upgrade image version 5.2.0 HOT 1
- Support for local storage HOT 3
- Custom image with new Timescaledb version HOT 1
- crunchy-pgbackrest:centos8-2.35-0 seems to be gone HOT 6
- timescaledb_toolkit in the 5.0 Operator HOT 1
- Incorrect commit hash for tag for v5.3.1 HOT 1
- Is there any rpm packages difference? HOT 2
- pgbackrest_env.stderr output HOT 1
- Support for ppc64le HOT 2
- Update to Patroni 3.0.2
- kube-apiserver crashes during pgbackrest backups
- pgAdmin 'ServerManager' object has no attribute 'user_info' HOT 5
- Cannot build postgres 15 HOT 3
- Container images not working at all
- Unable to start crunchy-pgadmin4 version 8-4.30-13 and byond HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crunchy-containers.