Re: Hard limit on WAL space used (because PANIC sucks)

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Hard limit on WAL space used (because PANIC sucks)
Дата
Msg-id 51B67829.1010502@agliodbs.com
обсуждение исходный текст
Ответ на Hard limit on WAL space used (because PANIC sucks)  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
> Not a bad idea. One that supports rsync and another that supports
> robocopy. That should cover every platform we support.

Example script:

=============================

#!/usr/bin/env bash

# Simple script to copy WAL archives from one server to another
# to be called as archive_command (call this as wal_archive "%p" "%f")

# Settings.  Please change the below to match your configuration.

# holding directory for the archived log files on the replica
# this is NOT pg_xlog:
WALDIR="/var/lib/pgsql/archive_logs"

# touch file to shut off archiving in case of filling up the disk:
NOARCHIVE="/var/lib/pgsql/NOARCHIVE"

# replica IP, IPv6 or DNS address:
REPLICA="192.168.1.3"

# put any special SSH options here,
# and the location of RSYNC:
export RSYNC_RSH="ssh"
RSYNC="/usr/bin/rsync"

######## DO NOT CHANGE THINGS BELOW THIS LINE ##########

SOURCE="$1" # %p
FILE="$2" # %f
DEST="${WALDIR}/${FILE}"

# See whether we want all archiving off
test -f ${NOARCHIVE} && exit 0

# Copy the file to the spool area on the replica, error out if
# the transfer fails
${RSYNC} --quiet --archive --rsync-path=${RSYNC} ${SOURCE} \
${REPLICA}:${DEST}

if [ $? -ne 0 ]; then       exit 1
fi

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Parallell Optimizer
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Don't downcase non-ascii identifier chars in multi-byte encoding