question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shutting down PostgreSQL may wait indefinitely

See original GitHub issue

It has happened that PostgreSQL does not shut down when signaled. Patroni then waits indefinitely for postgres to shut down.

It may be a ok idea to do a shutdown -m immediate after n minutes if postgres doesn’t shutdown.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
alexeyklyukincommented, Aug 1, 2016

We don’t know, and yes, we can use some help investigating this.

0reactions
alexeyklyukincommented, Dec 22, 2017

Making immediate shutdown in either the restart or the switchover case is dangerous. We cannot influence PostgreSQL to shut down faster than it is, so if PG doesn’t shut down - it should be the operator responsibility to investigate (for instance, if the is a logical decoding client active).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation: 15: 19.5. Shutting Down the Server - PostgreSQL
There are several ways to shut down the database server. ... It then waits for all server processes to exit and finally shuts...
Read more >
Shutdown mode fast for stopping PostgresSQL standby server
So a so-called "smart" shutdown executed on the master will not wait indefinitely for the WAL receiver to go away on its own....
Read more >
Postgres Database Local Installation / Running - Stack Overflow
This message: createdb: could not connect to database postgres: could not connect to server: No such file or directory Is the server running...
Read more >
3.6. Stopping Pgpool-II and PostgreSQL
"fast" means shutdown Pgpool-II immediately even if there are existing ... But this could make Pgpool-II wait forever and this may result in...
Read more >
PostgreSQL lessons we learned the hard way - Medium
Postgres will first attempt to acquire the relevant locks (and wait ... operation B may have to wait until operation A has completed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found