1

Topic: PostgresSQL at server restarting the basis is long recovered

Good afternoon!
As with PostgreSQL before did not work, and to ask there is nobody, I ask for suggestions here.
Server PostgreSQL 9.4.
There are power supplies failures, the server through time turnes on on command from UPS.
At server PostgreSQL start some bases any time are inaccessible, are in a recovery mode.
It  should be, or late adjust what parameters that bases were accessible at once, but with loss of last transactions?
Before worked with MS SQL in other organization, similar problems did not note.

2

Re: PostgresSQL at server restarting the basis is long recovered

Vladimir Lazurko;
It means that the basis has been ungeared . At switching-on after supernumerary shut-down on WAL recovers the state, with  a config - without loss  transactions. Well also the cluster with all bases is recovered entirely.
If at you a little  it is launched - only then it is possible to watch that some bases still in recovery, and some were already launched.
What to do - to increase time between a command by shut-down and real miss of a supply from .
If you changed max_wal_size (and, for 9.4 - then checkpoint_segments) - that makes sense to command checkpoint to basis for example in a minute after passage to batteries.

Lazurko wrote:

the server through time turnes on on command from UPS.

Or at you generally correct shut-down at a supply from the battery is not provided?

3

Re: PostgresSQL at server restarting the basis is long recovered

Vladimir Lazurko;
And it is exact PostgreSQL it is correctly ungeared?

4

Re: PostgresSQL at server restarting the basis is long recovered

Lazurko wrote:

  through time turnes on on command from UPS

is ungeared.
Misprint.

Melkij wrote:

Or at you generally correct shut-down at a supply from the battery is not provided?

Here while it is not clear. I can not find this moment - this night again turned off the light, in the morning manually launched the server. After that the basis was in a recovery mode - shut-down means was incorrect.

mad_nazgul wrote:

And it is exact PostgreSQL it is correctly ungeared?

Most likely, no.
Possibly, it does not have not enough time for a stop of services? To adjust, that , for example, it was ungeared not on 10 % of a charge and on 20 %? That time sufficed it?

5

Re: PostgresSQL at server restarting the basis is long recovered

6

Re: PostgresSQL at server restarting the basis is long recovered

*
https://stackoverrun.com/ru/q/92157/--postgres------
https://habr.com/post/98770/
https://postgrespro.ru/docs/postgresql/ … tdown.html
https://infostart.ru/public/325482/

7

Re: PostgresSQL at server restarting the basis is long recovered

Vladimir Lazurko;
Look in basis broad gulls when also that received what request about shut-down. And that suddenly at you there generally immediate shutdown was instead of fast, or simply any notification on shut-down.
Well and very not bad to compare with a broad gull of discharge UPS if is.

8

Re: PostgresSQL at server restarting the basis is long recovered

Thanks, I will look.