Skip to content

Commit 2ea9596

Browse files
authored
Remove inaccurate references to corruption, remove SEGTERM suggestion, update information links to current docs. Postgres is carefully designed such that data is not corrupted on crashes or unclean shutdowns - the main tradeoff is that WAL replay is needed on startup. In practice, SIGTERM can cause unexpected long delays to shutdowns - often during maintenance windows - so best not to activaly suggest this. The links back to official Postgres documentation seem sufficient.
1 parent cb04936 commit 2ea9596

File tree

2 files changed

+10
-22
lines changed

2 files changed

+10
-22
lines changed

Dockerfile-alpine.template

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,12 @@ ENTRYPOINT ["docker-entrypoint.sh"]
232232
# We set the default STOPSIGNAL to SIGINT, which corresponds to what PostgreSQL
233233
# calls "Fast Shutdown mode" wherein new connections are disallowed and any
234234
# in-progress transactions are aborted, allowing PostgreSQL to stop cleanly and
235-
# flush tables to disk, which is the best compromise available to avoid data
236-
# corruption.
235+
# flush tables to disk.
237236
#
238-
# Users who know their applications do not keep open long-lived idle connections
239-
# may way to use a value of SIGTERM instead, which corresponds to "Smart
240-
# Shutdown mode" in which any existing sessions are allowed to finish and the
241-
# server stops when all sessions are terminated.
242-
#
243-
# See https://www.postgresql.org/docs/12/server-shutdown.html for more details
237+
# See https://www.postgresql.org/docs/current/server-shutdown.html for more details
244238
# about available PostgreSQL server shutdown signals.
245239
#
246-
# See also https://www.postgresql.org/docs/12/server-start.html for further
240+
# See also https://www.postgresql.org/docs/current/server-start.html for further
247241
# justification of this as the default value, namely that the example (and
248242
# shipped) systemd service files use the "Fast Shutdown mode" for service
249243
# termination.
@@ -253,10 +247,10 @@ STOPSIGNAL SIGINT
253247
# An additional setting that is recommended for all users regardless of this
254248
# value is the runtime "--stop-timeout" (or your orchestrator/runtime's
255249
# equivalent) for controlling how long to wait between sending the defined
256-
# STOPSIGNAL and sending SIGKILL (which is likely to cause data corruption).
250+
# STOPSIGNAL and sending SIGKILL.
257251
#
258252
# The default in most runtimes (such as Docker) is 10 seconds, and the
259-
# documentation at https://www.postgresql.org/docs/12/server-start.html notes
253+
# documentation at https://www.postgresql.org/docs/current/server-start.html notes
260254
# that even 90 seconds may not be long enough in many instances.
261255

262256
EXPOSE 5432

Dockerfile-debian.template

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,12 @@ ENTRYPOINT ["docker-entrypoint.sh"]
192192
# We set the default STOPSIGNAL to SIGINT, which corresponds to what PostgreSQL
193193
# calls "Fast Shutdown mode" wherein new connections are disallowed and any
194194
# in-progress transactions are aborted, allowing PostgreSQL to stop cleanly and
195-
# flush tables to disk, which is the best compromise available to avoid data
196-
# corruption.
195+
# flush tables to disk.
197196
#
198-
# Users who know their applications do not keep open long-lived idle connections
199-
# may way to use a value of SIGTERM instead, which corresponds to "Smart
200-
# Shutdown mode" in which any existing sessions are allowed to finish and the
201-
# server stops when all sessions are terminated.
202-
#
203-
# See https://www.postgresql.org/docs/12/server-shutdown.html for more details
197+
# See https://www.postgresql.org/docs/current/server-shutdown.html for more details
204198
# about available PostgreSQL server shutdown signals.
205199
#
206-
# See also https://www.postgresql.org/docs/12/server-start.html for further
200+
# See also https://www.postgresql.org/docs/current/server-start.html for further
207201
# justification of this as the default value, namely that the example (and
208202
# shipped) systemd service files use the "Fast Shutdown mode" for service
209203
# termination.
@@ -213,10 +207,10 @@ STOPSIGNAL SIGINT
213207
# An additional setting that is recommended for all users regardless of this
214208
# value is the runtime "--stop-timeout" (or your orchestrator/runtime's
215209
# equivalent) for controlling how long to wait between sending the defined
216-
# STOPSIGNAL and sending SIGKILL (which is likely to cause data corruption).
210+
# STOPSIGNAL and sending SIGKILL.
217211
#
218212
# The default in most runtimes (such as Docker) is 10 seconds, and the
219-
# documentation at https://www.postgresql.org/docs/12/server-start.html notes
213+
# documentation at https://www.postgresql.org/docs/current/server-start.html notes
220214
# that even 90 seconds may not be long enough in many instances.
221215

222216
EXPOSE 5432

0 commit comments

Comments
 (0)