Re: Issues shutting down PostgreSQL 10 cleanly

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Issues shutting down PostgreSQL 10 cleanly
Date: 2017-10-24 06:20:19
Message-ID: 1508826019.2805.2.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Stephen Froehlich wrote:
> I am in the midst of heavy, large write operations on a new database this is currently around 23 billion lines.
>  
> My max_wal_size is 256 GB and my checkpoint_timeout is 12 hours. (Smaller values were hindering the writes.) Note: this is on Ubuntu 16.04 LTS.
>  
> I am having trouble shutting down postgres cleanly – how can I fix that?
>  
> A “/etc/init.d/postgresql restart” command gave the following log entries:
>  
> 2017-10-20 09:17:55.069 MDT [16388] LOG:  received fast shutdown request
> 2017-10-20 09:17:55.069 MDT [16388] LOG:  aborting any active transactions
> 2017-10-20 09:17:55.069 MDT [20336] FATAL:  terminating autovacuum process due to administrator command
> 2017-10-20 09:17:55.069 MDT [20540] FATAL:  terminating autovacuum process due to administrator command
> 2017-10-20 09:17:55.069 MDT [20132] FATAL:  terminating autovacuum process due to administrator command
> 2017-10-20 09:17:55.070 MDT [1486] sfroehlich(at)mediacom_df_vd FATAL:  terminating connection due to administrator command
> 2017-10-20 09:17:55.070 MDT [1488] sfroehlich(at)mediacom_df_vd FATAL:  terminating connection due to administrator command
> 2017-10-20 09:17:55.070 MDT [1487] sfroehlich(at)mediacom_df_vd FATAL:  terminating connection due to administrator command
> 2017-10-20 09:17:55.070 MDT [1489] sfroehlich(at)mediacom_df_vd FATAL:  terminating connection due to administrator command
> 2017-10-20 09:17:55.070 MDT [1485] sfroehlich(at)mediacom_df_vd FATAL:  terminating connection due to administrator command
> 2017-10-20 09:17:55.074 MDT [16388] LOG:  worker process: logical replication launcher (PID 16400) exited with exit code 1
> 2017-10-20 09:19:08.363 MDT [16395] LOG:  shutting down
> 2017-10-20 09:20:29.559 MDT [32352] LOG:  listening on IPv4 address "0.0.0.0", port 5432
> 2017-10-20 09:20:29.559 MDT [32352] LOG:  listening on IPv6 address "::", port 5432
> 2017-10-20 09:20:29.560 MDT [32352] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
> 2017-10-20 09:20:57.956 MDT [32454] LOG:  database system shutdown was interrupted; last known up at 2017-10-20 09:19:08 MDT
> 2017-10-20 09:21:03.598 MDT [32454] LOG:  database system was not properly shut down; automatic recovery in progress
> 2017-10-20 09:21:03.646 MDT [32454] LOG:  redo starts at 972/DB0B0838
> pg_ctl: server did not start in time
> 2017-10-20 09:21:29.645 MDT [32352] LOG:  received smart shutdown request
> 2017-10-20 09:21:29.735 MDT [32558] LOG:  shutting down
> 2017-10-20 09:21:30.019 MDT [32352] LOG:  database system is shut down

What happens if you run /etc/init.d/postgresql stop?

Clean shutdown? Any processes left running?

I would examine /etc/init.d/postgresql and see if it does evil things
like porcibly remove the postmaster.pid file.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Simon Riggs 2017-10-24 06:27:29 Re: Issues shutting down PostgreSQL 10 cleanly
Previous Message Bee.Lists 2017-10-23 23:22:38 New Version Errors