From: | Lucas Possamai <drum(dot)lucas(at)gmail(dot)com> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | armand pirvu <armand(dot)pirvu(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: hot standby questions |
Date: | 2017-08-04 04:03:59 |
Message-ID: | CAE_gQfXrgQO2Rds1Pv1c_vHgCnE4aD6oq1ec-qKsb5uX8zPvtg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2017-08-04 5:58 GMT+12:00 Jeff Janes <jeff(dot)janes(at)gmail(dot)com>:
> On Wed, Aug 2, 2017 at 8:19 PM, armand pirvu <armand(dot)pirvu(at)gmail(dot)com>
> wrote:
>
>>
>> Hi
>>
>> Just trying to put together the hot_standby setup
>> All docs I read are pointing to use as prefered method to use
>> pg_basebackup to set the base
>> So far so good
>> But
>>
>> psql postgres -c "select pg_start_backup('backup')"
>> pg_basebackup -D /var/lib/pgsql/sample -Ft -z -P
>> psql postgres -c "select pg_stop_backup()"
>>
>
> pg_basebackup does the equivalent of pg_start_backup and pg_stop_backup
> for you. It is not helpful, and might even sometimes be harmful, to do
> them yourself when using pg_basebackup.
>
>
>>
>> Pretty much every where I looked at -x is not mentioned to be used
>>
>> So what gives ? What did I miss ? It's gotta be soomething
>>
>
> That certainly isn't my experience. If you find sites that don't mention
> -x, -X, or --xlog-method, then I would be reluctant to take any of that
> site's other advice seriously.
>
> But note that in version 10, -x will go away and the default will be
> changed so that not specifying anything will be the same as -X stream.
> perhaps you are reading advice aimed at a future version.
>
> Cheers,
>
> Jeff
>
I use pg_basebackup every day and the way I do is:
pg_basebackup -D /destination --checkpoint=fast --xlog-method=stream
The --xlog-method=stream option will copy the wal_files as well (to
pg_xlogs directory).
That works pretty well for me. You can either add the compress option too.
Hope this was helpful.
Cheers,
Lucas
From | Date | Subject | |
---|---|---|---|
Next Message | k b | 2017-08-04 05:54:19 | Re: cast issue in WITH RECURION |
Previous Message | Mark Street | 2017-08-04 02:40:46 | Setting Variables within the PostgreSQL Service Process on AWS Linux |