From: | "sivapostgres(at)yahoo(dot)com" <sivapostgres(at)yahoo(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Ron <ronljohnsonjr(at)gmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Issue in PG start |
Date: | 2021-05-09 02:19:24 |
Message-ID: | 777265841.2285896.1620526764463@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
1. First why switch the computer off for lunch? It's a development machine and I'm a developer. We used to shut down every computer for lunch. We shut down the windows and not just hit the power switch. We advice and follow every users and client to shut down the windows properly and we follow it.
2. In postgresql.conf what is log_min_messages set to? Warning
3. Do you have replication set up with this server? No
4. Is Windows Postgresql a service? If so then Windows "should" shut it down cleanly when you cleanly power off the machine.
Yes, Postgresql is a service and windows is shut down properly. We do shut down computers during lunch and when closing office, regularly and properly for the past 6 months [ since PG was installed ] without any issue. This is the first time that we face this issue.
Need to find a solution that will be helpful if that happens in a production machine.
Happiness Always
BKR Sivaprakash
On Saturday, 8 May, 2021, 10:24:03 pm IST, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:
> On 5/8/21 9:23 AM, Ron wrote:
>> Is Windows Postgresql a service? If so then Windows "should" shut it
>> down cleanly when you cleanly power off the machine.
> The log would indicate otherwise:
>
>>> 2021-05-08 10:26:20.783 IST [7360] LOG: database system was
>>> interrupted; last known up at 2021-05-07 18:46:00 IST
>
> So something is not working as it should.
Yeah, that's bad news. In theory, as long as you didn't set
fsync = off, Postgres should be able to recover from an unclean
shutdown. In practice, that requires all the levels of the
hardware and software stack to pay strict attention to write
ordering requirements. It is, um, pretty common for inexpensive
Windows gear to not be very careful about that. I'd say this
particular machine has clearly failed the plug-pull test [1].
If the OP is in the habit of just hitting the power switch
at lunchtime, I'd say he's got to stop doing that. Telling
Windows to shut down will add a few seconds, but greatly
reduce the risk of problems (and not only for Postgres).
If he *did* tell Windows to shut down, then there's something
else that needs adjustment.
regards, tom lane
[1] https://wiki.postgresql.org/wiki/Reliable_Writes
From | Date | Subject | |
---|---|---|---|
Next Message | sivapostgres@yahoo.com | 2021-05-09 02:32:10 | Re: Issue in PG start |
Previous Message | Peter J. Holzer | 2021-05-08 19:07:58 | Re: idle_in_transaction_session_timeout |