Search Postgresql Archives

vacuumdb seems not to like option -j when run from crontab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PG 9.6.24 (Yes, it's EOL.)

When running "vacuumdb -p5433 -j4 --analyze tap_d" from a bash prompt, it works as expected:
$ vacuumdb -p5433 -j4 --analyze tap_d
vacuumdb: vacuuming database "tap_d"

But not when running from crontab:
vacuumdb -p5433 -j4 --analyze tap_d
vacuumdb: invalid option -- 'j'
Try "vacuumdb --help" for more information.

Obviously I'm missing something, but don't see what it is.  Attached is the script it runs from.

#!/bin/bash

ActionLabel=VACUUM
echo; date +"%n%F %T TIMEIT $ActionLabel started."; echo
START_SECS=$(date +"%s")

set -x
vacuumdb -p5433 -j4 --analyze tap_d
set +x

FINISH_SECS=$(date +"%s")
ET=$(echo "scale=2;(${FINISH_SECS} - ${START_SECS})/60" | bc)
date +"%n%F %T TIMEIT $ActionLabel finished. Elapsed time: ${ET} minutes."

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux