Re: pg_dumpall: could not connect to database "template1": FATAL:

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: pg_dumpall: could not connect to database "template1": FATAL:
Дата
Msg-id 0c8722b4-378f-8b06-ae7b-deb557372c29@aklaver.com
обсуждение исходный текст
Ответ на Re: pg_dumpall: could not connect to database "template1": FATAL:  (aws backup <albatin.saltanat@gmail.com>)
Ответы Re: pg_dumpall: could not connect to database "template1": FATAL:  (aws backup <albatin.saltanat@gmail.com>)
Список pgsql-general
On 11/13/2016 01:01 PM, aws backup wrote:
> Hi,
>
> thank you so much.
> With your help I could solve all my problems.
> DaVinci has a bug somewhere with the database configuration.
> I installed everything new and set all auth method to trust instead of md5 which was default from DaVinci.

Just remember that trust is just that, trust. If someone knows a valid
username they have access, subject to other conditions set in pg_hba.conf.

> Now everything is working as expected. No errors anymore with the backup and restore buttons in DaVinci which are
justlinked to the pg_dump and pg_restore scripts. 
> The pg_dumpall approach was from the example scripts which are posted in the DaVinci Forum.
> But this approach doesn't make sense … ?

It does if you want to backup the state of the entire cluster. Could be
that DaVinci is including things in the template1 and postgres databases
that are needed. The other thing that pg_dumpall gets you is data global
to the cluster:

https://www.postgresql.org/docs/9.5/static/app-pg-dumpall.html

" ...  pg_dumpall also dumps global objects that are common to all
databases. (pg_dump does not save these objects.) ..."

Though you can have your cake and eat it to by using pg_dump for
individual databases and then

pg_dumpall -g

where -g is:

"-g
--globals-only

     Dump only global objects (roles and tablespaces), no databases.
"

>
> Best Regards,
> Robert
>
>
>
>> On 13 Nov 2016, at 19:13, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>>
>> On 11/13/2016 09:04 AM, aws backup wrote:
>>> Hi Adrian,
>>>
>>> thank you for the explanation.
>>> I will look into you links.
>>>
>>> I am doing this because I want to make backups from the
>>> database. Ideally automatic backups every night.
>>> The Blackmagic support says they can't help me with this. The Backup and
>>> Restore button in DaVinci does not work.
>>> Every database related question I ask the Blackmagic support stays
>>> unanswered.
>>
>> Guessing they are treating the Postgres database as an embedded one that should not be touched by the end user.
>>
>>> For example: How can I restart the SQL server? Oh sorry we can't help
>>> you with this … ?
>>
>> https://www.postgresql.org/docs/9.5/static/app-pg-ctl.html
>>
>>>
>>> Thank you.
>>> Robert
>>>
>>>
>>>
>>>
>> --
>> Adrian Klaver
>> adrian.klaver@aklaver.com
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


В списке pgsql-general по дате отправления:

Предыдущее
От: aws backup
Дата:
Сообщение: Re: pg_dumpall: could not connect to database "template1": FATAL:
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Exclude pg_largeobject form pg_dump