From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Kevin Brannen <KBrannen(at)efji(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: pg_restore issues with intarray |
Date: | 2019-09-05 23:28:09 |
Message-ID: | 804d3055-b371-d914-7a77-1b9d8cf703cf@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 9/5/19 4:24 PM, Adrian Klaver wrote:
> On 9/5/19 4:06 PM, Kevin Brannen wrote:
>>> From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
>>>
>>> On 9/5/19 2:57 PM, Kevin Brannen wrote:
>>>> I think I need some help to understand what’s going here because I
>>>> can’t figure it out and google isn’t helping.
>>>>
>>>> This is for Pg 9.6.5. (Yes, we are upgrading to 12.x in a few months,
>>>> or so the plan is.) Pg code came from the community and we compiled it
>>>> with no changes. This is on Centos 6.7, though I think the OS
>>>> doesn’t matter.
>>>>
>>>> We’re calling pg_restore like:
>>>>
>>>> $PGPATH/pg_restore -jobs=$NCPU --dbname=x .
>>>>
>>>> FWIW, the backup was created with:
>>>>
>>>> $PGPATH/pg_dump --clean --create --format=d --jobs=$NCPU --file=$EXP
>>>> --dbname=x
>>>
>>> The options you are adding for --clean, --create only have meaning
>>> for plain text dumps. If you want those actions to occur on the
>>> restore then add them to the pg_restore line. Though if you are going
>>> to create a new database it will inherit objects from template1(as
>>> you found below), assuming you have not set WITH TEMPLATE to
>>> something else.
>>>
>>
>> Good point that I'm not doing plain text dumps.
>>
>> Are you saying that my problem is that I need "--clean" on the
>> pg_restore?
>
> No, just that if you where expecting the clean to happen on the restore
> you would be disappointed.
>
>> I can try that. The fact that this only happens on a few DBs and not
>> all still
>> mystifies me. See below on the template..
>
> My guess is you where restoring into a database with preexisting objects
> because neither create or clean was being done.
Just be aware that --clean & --create drops the existing database before
creating a new one.
>
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Judith Lacoste | 2019-09-05 23:33:27 | Re: Question from someone who is not trained in computer sciences |
Previous Message | Adrian Klaver | 2019-09-05 23:24:12 | Re: pg_restore issues with intarray |