From: Joerg Jaspert Date: Tue, 29 Mar 2011 20:43:36 +0000 (+0200) Subject: function pg_timestamp X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=37eb0b843997282b747da4559213dea9cfe5ee3d;p=dak.git function pg_timestamp Signed-off-by: Joerg Jaspert --- diff --git a/config/backports/common b/config/backports/common index 2c7b76ba..050f506a 100644 --- a/config/backports/common +++ b/config/backports/common @@ -101,3 +101,9 @@ function reports() { # dak cruft-report -s experimental >> $webdir/cruft-report-daily.txt cat $webdir/cruft-report-daily.txt | mail -e -s "Debian archive cruft report for $(date +%D)" team@backports.debian.org } + +function pg_timestamp() { + tsname=${1:-"unknown"} + log "Saving postgres transaction id for ${tsname}" + psql -tAc 'select txid_current();' > $base/backup/txid_${tsname}_$(date +%Y.%m.%d-%H:%M:%S) +}