]> git.decadent.org.uk Git - dak.git/commitdiff
function pg_timestamp
authorJoerg Jaspert <joerg@debian.org>
Tue, 29 Mar 2011 20:43:36 +0000 (22:43 +0200)
committerJoerg Jaspert <joerg@debian.org>
Tue, 29 Mar 2011 20:43:36 +0000 (22:43 +0200)
Signed-off-by: Joerg Jaspert <joerg@debian.org>
config/backports/common

index 2c7b76ba366b320a074dab046bc963480ae5b7a6..050f506a65753c625b4165ed8ec8bbe5cc4d9cff 100644 (file)
@@ -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)
+}