Re: Final pg_dumpall should happen in Single-User-Mode

From: Thomas Güttler <guettliml(at)thomas-guettler(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Final pg_dumpall should happen in Single-User-Mode
Date: 2017-09-27 08:12:17
Message-ID: bb4b5824-6fdc-61a8-a84f-b495227adf9c@thomas-guettler.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Just for the records, I use this solution now:
https://dba.stackexchange.com/questions/186045/how-do-i-prevent-changes-to-my-database/186051#186051

Change the port of PostgreSQL on prod-server-old. This way it is unlikely that clients connect to the DB during
pg_dumpall --port=OTHER_PORT

BTW: In my case a short down-time is no problem.

Regards,
Thomas

Am 20.09.2017 um 09:59 schrieb Thomas Güttler:
> Just for the records, I asked here the same question and got some replies:
>
> https://dba.stackexchange.com/questions/186045/how-do-i-prevent-changes-to-my-database
>
> Am 11.09.2017 um 15:25 schrieb Thomas Güttler:
>> I did a stupid mistake. I run the final pg_dumpall without switching to single-user-mode first.
>>
>> With "final" I mean that the dump should be transferred to a different machine. After the dump
>> the old machine was shut down forever.
>>
>> My mistake was that I stopped the services, but one process was still alive and this process
>> inserted to the database after pg_dumpall has started.
>>
>> I guess I am not the first one who did this stupid mistake.
>>
>> What do you think? Wouldn't it be polite to add a note about this topic to the docs?
>>
>> Here are the docs for pg_dumpall: https://www.postgresql.org/docs/current/static/app-pg-dumpall.html
>>
>> How could the wording look like? I am not a native speaker ....
>>
>> Or do you have a better/different idea?
>>
>> Regards,
>> Thomas Güttler
>>
>>
>

--
Thomas Guettler http://www.thomas-guettler.de/
I am looking for feedback: https://github.com/guettli/programming-guidelines

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Denisa Cirstescu 2017-09-27 08:46:09 Re: Catching errors inside a LOOP is causing performance issues
Previous Message Jonathan Moules 2017-09-27 08:08:25 Speed of conversion from int to bigint