From: | Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com> |
---|---|
To: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Issues shutting down PostgreSQL 10 cleanly |
Date: | 2017-10-24 18:04:38 |
Message-ID: | DM5PR06MB28914DA57E7E0B202FAADA85E5470@DM5PR06MB2891.namprd06.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi Laurenz,
/etc/init.d/postgresql stop prompts the same condition.
Simon - I get that ...
Apparently the solution is to run a checkpoint first and then shutdown?
http://rhaas.blogspot.com/2015/03/postgresql-shutdown.html
I'll try this likely tomorrow and let you know.
--Stephen
-----Original Message-----
From: Laurenz Albe [mailto:laurenz(dot)albe(at)cybertec(dot)at]
Sent: Tuesday, October 24, 2017 12:20 AM
To: Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com>; pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] Issues shutting down PostgreSQL 10 cleanly
CableLabs WARNING: The sender of this email could not be validated and may not match the person in the "From" field.
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
From | Date | Subject | |
---|---|---|---|
Next Message | Ruslan R. Laishev | 2017-10-30 10:19:41 | unpacking result (in binary form) |
Previous Message | Ruslan R. Laishev | 2017-10-24 11:10:37 | BYTEA Arrays Input and Output C example |