From c6dcf7810701cd84940844dc8471aa35a71bd7e9 Mon Sep 17 00:00:00 2001 From: Palle Girgensohn Date: Mon, 20 Sep 2010 13:46:47 +0000 Subject: PostgreSQL 9.0 is here! The PostgreSQL Global Development Group announces the availability of our most eagerly awaited release. PostgreSQL 9.0 includes built-in, binary replication, and over a dozen other major features which will appeal to everyone from web developers to database hackers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 9.0 includes more major features than any release before it, including: * Hot standby * Streaming replication * In-place upgrades * 64-bit Windows builds * Easy mass permissions management * Anonymous blocks and named parameter calls for stored procedures * New windowing functions and ordered aggregates ... and many more. For details on the over 200 additions and improvements in this version, developed by over a hundred contributors, please see the release notes. "These kinds of feature additions continue to make a strong case for why mission-critical technology tasks can continue to depend on the power, flexibility and robustness of PostgreSQL,” said Afilias CTO Ram Mohan. More information on PostgreSQL 9.0: * Release notes http://www.postgresql.org/docs/9.0/static/release-9-0 * Presskit http://www.postgresql.org/about/press/presskit90 * Guide to 9.0: http://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9.0 --- PR: 150430, Add dtrace --- databases/postgresql90-server/files/502.pgsql | 30 +++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'databases/postgresql90-server/files/502.pgsql') diff --git a/databases/postgresql90-server/files/502.pgsql b/databases/postgresql90-server/files/502.pgsql index d2235e414cd2..281189a59c46 100644 --- a/databases/postgresql90-server/files/502.pgsql +++ b/databases/postgresql90-server/files/502.pgsql @@ -15,7 +15,8 @@ # Define these variables in either /etc/periodic.conf or # /etc/periodic.conf.local to override the default values. # -# daily_pgsql_backup_enable="YES" # do backup +# daily_pgsql_backup_enable="YES" # do backup of all databases +# daily_pgsql_backup_enable="foo bar db1 db2" # only do backup of a limited selection of databases # daily_pgsql_vacuum_enable="YES" # do vacuum daily_pgsql_vacuum_args="-z" @@ -37,9 +38,7 @@ eval backupdir=${daily_pgsql_backupdir} rc=0 -case "$daily_pgsql_backup_enable" in - [Yy][Ee][Ss]) - +pgsql_backup() { # daily_pgsql_backupdir must be writeable by user pgsql # ~pgsql is just that under normal circumstances, # but this might not be where you want the backups... @@ -53,16 +52,18 @@ case "$daily_pgsql_backup_enable" in # Protect the data umask 077 - dbnames=`su -l pgsql -c "umask 077; psql -q -t -A -d template1 -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"` rc=$? now=`date "+%Y-%m-%dT%H:%M:%S"` file=${daily_pgsql_backupdir}/pgglobals_${now} su -l pgsql -c "umask 077; pg_dumpall -g | gzip -9 > ${file}.gz" - for db in ${dbnames}; do + + db=$1 + while shift; do echo -n " $db" file=${backupdir}/pgdump_${db}_${now} su -l pgsql -c "umask 077; pg_dump ${daily_pgsql_pgdump_args} -f ${file} ${db}" [ $? -gt 0 ] && rc=3 + db=$1 done if [ $rc -gt 0 ]; then @@ -73,6 +74,23 @@ case "$daily_pgsql_backup_enable" in # cleaning up old data find ${backupdir} \( -name 'pgdump_*' -o -name 'pgglobals_*' \) \ -a -mtime +${daily_pgsql_savedays} -delete + echo +} + +case "$daily_pgsql_backup_enable" in + [Yy][Ee][Ss]) + dbnames=`su -l pgsql -c "umask 077; psql -q -t -A -d template1 -c SELECT\ datname\ FROM\ pg_database\ WHERE\ datname!=\'template0\'"` + pgsql_backup $dbnames + ;; + + [Nn][Oo]) + ;; + + "") + ;; + + *) + pgsql_backup $daily_pgsql_backup_enable ;; esac -- cgit v1.2.3