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

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: vacuumdb seems not to like option -j when run from crontab
Date: 2023-12-04 16:07:25
Message-ID: CANzqJaAbSRD1aPtkL_5bj16Gi77Hi=-eVqDVThGuBa4Sxgbn1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Attachment Content-Type Size
depart_031_vacuum.sh text/x-sh 342 bytes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alan Hodgson 2023-12-04 16:13:00 Re: vacuumdb seems not to like option -j when run from crontab
Previous Message Joe Conway 2023-12-04 15:45:58 Re: Emitting JSON to file using COPY TO