From: | Jerry Sievers <gsievers19(at)comcast(dot)net> |
---|---|
To: | Steve Atkins <steve(at)blighty(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Why does this hot standy archive_command work |
Date: | 2017-01-23 17:52:46 |
Message-ID: | 8637g9ll3l.fsf@jerry.enova.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Steve Atkins <steve(at)blighty(dot)com> writes:
>> On Jan 20, 2017, at 7:03 PM, btober(at)computer(dot)org <btober(at)broadstripe(dot)net> wrote:
>>
>> While learning a bit about basic hot standby configuration, I was reviewing an article that used these parameters
>>
>> wal_level = 'hot_standby'
>> archive_mode = on
>> archive_command = 'cd .'
That's just a very silly way of making archive_command a true no-op...
I would have set it to '/bin/true'
>> max_wal_senders = 1
>> hot_standby = on
>>
>>
>> How or why that particular archive_command actually works (... and it does ... I tried it ...) is not clear to me based on reading of the Postgresql documentation on this topic. I would have expected to see an actual copy or rsync command, as described in the fine manual at section 25.3.1. "Setting Up WAL Archiving"
>>
>> The entire example appears at
>>
>> https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresql-on-an-ubuntu-12-04-vps
>>
>> Can anyone enlighten on this topic, or provide a link to an existing explanation?
>
> It's not archiving logs at all, instead relying on streaming them directly to the slave.
>
> Changing archive_mode requires a server restart, while changing archive_command from a command that does nothing, successfully, to a command that actually archives logs just requires a reload. So this lets you enable archiving without halting the server by changing the command.
>
> Or that's how I vaguely recall it working some years ago. Things may have changed now - you're following a very old tutorial.
>
> Cheers,
> Steve
--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres(dot)consulting(at)comcast(dot)net
p: 312.241.7800
From | Date | Subject | |
---|---|---|---|
Next Message | btober@computer.org | 2017-01-23 18:06:01 | Re: Why does this hot standy archive_command work |
Previous Message | Adrian Klaver | 2017-01-23 17:15:09 | Re: What is the purpose of PostGIS on PostgreSQL? |