From 37eb0b843997282b747da4559213dea9cfe5ee3d Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Tue, 29 Mar 2011 22:43:36 +0200 Subject: [PATCH] function pg_timestamp Signed-off-by: Joerg Jaspert --- config/backports/common | 6 ++++++ 1 file changed, 6 insertions(+) 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) +} -- 2.39.5