Re: Question about wal files / pg_xlogs

From: Patrick B <patrickbakerbr(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about wal files / pg_xlogs
Date: 2016-08-04 02:59:10
Message-ID: CAJNY3iuQ-crCb--se03o_==K3Bs7P-3NAtoJHNzBvNHRyY9nCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
>
>>
> Both machines have same timezone?
>

Yes! Shouldn't be showing 2 hours before.. I just checked and both server
has the same date / timezone

>
> How fast are you generating WALs?
>

Check below please

checkpoint_segments = 64
> checkpoint_timeout = 5min
> checkpoint_completion_target = 0.6
> checkpoint_warning = 30s
> archive_timeout = 1800
> max_wal_senders = 8
> wal_keep_segments = 256

>
> How are you shipping the WALs?
>
>

I use a bash script to ship them. The script hasn't being changed.... So it
isn't the problem.

*postgresql.conf:*

> archive_command = 'exec nice -n 19 ionice -c 2 -n 7 archive_command.bash
> "%p" slave01 slave02'

*archive_command.bash:*

Basically we use TAR to ship through ssh:

> # we use tar over SSH as I don't fully trust scp's exit status. The added
> benefit is that tar preserves all attributes
> # the downside is that it's a little tricky to make the remote path
> relative
> tar -c -O --no-same-owner -C "${WAL_SEGMENT%/*}" "${WAL_SEGMENT##*/}" |
> ssh -p ${NEXT_PORT} -C -o 'BatchMode=yes' -o 'CompressionLevel=3' "${USER}(at)${NEXT_HOST}"
> "exec tar -x --no-same-owner --overwrite -C '${WAL_ARCHIVE_PATH}'";
> PS_CONCAT="${PIPESTATUS[*]}";

The script is complex, but as I said, nothing has been changed on it.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Venkata Balaji N 2016-08-04 04:08:29 Re: Question about wal files / pg_xlogs
Previous Message Adrian Klaver 2016-08-04 02:45:49 Re: Question about wal files / pg_xlogs