pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
vacuumdb seems not to like option -j when run from crontab
5+ messages / 4 participants
[nested] [flat]

* vacuumdb seems not to like option -j when run from crontab
@ 2023-12-04 16:07 Ron Johnson <ronljohnsonjr@gmail.com>
  2023-12-04 16:13 ` Re: vacuumdb seems not to like option -j when run from crontab Alan Hodgson <ahodgson@lists.simkin.ca>
  0 siblings, 1 reply; 5+ messages in thread

From: Ron Johnson @ 2023-12-04 16:07 UTC (permalink / raw)
  To: 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.

Attachments:

depart_031_vacuum.sh (text/x-sh, 342B) download #!/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."
^ permalink raw reply [nested|flat] 5+ messages in thread

* Re: vacuumdb seems not to like option -j when run from crontab
  2023-12-04 16:07 vacuumdb seems not to like option -j when run from crontab Ron Johnson <ronljohnsonjr@gmail.com>
@ 2023-12-04 16:13 ` Alan Hodgson <ahodgson@lists.simkin.ca>
  2023-12-04 16:19   ` Re: vacuumdb seems not to like option -j when run from crontab kaido vaikla <kaido.vaikla@gmail.com>
  2023-12-04 16:22   ` Re: vacuumdb seems not to like option -j when run from crontab Ron Johnson <ronljohnsonjr@gmail.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Alan Hodgson @ 2023-12-04 16:13 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On Mon, 2023-12-04 at 11:07 -0500, Ron Johnson wrote:
> 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.
> 

Is your user and PATH the same? ie. are you running the same vacuumdb
executable?

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: vacuumdb seems not to like option -j when run from crontab
  2023-12-04 16:07 vacuumdb seems not to like option -j when run from crontab Ron Johnson <ronljohnsonjr@gmail.com>
  2023-12-04 16:13 ` Re: vacuumdb seems not to like option -j when run from crontab Alan Hodgson <ahodgson@lists.simkin.ca>
@ 2023-12-04 16:19   ` kaido vaikla <kaido.vaikla@gmail.com>
  1 sibling, 0 replies; 5+ messages in thread

From: kaido vaikla @ 2023-12-04 16:19 UTC (permalink / raw)
  To: Alan Hodgson <ahodgson@lists.simkin.ca>; +Cc: pgsql-general@lists.postgresql.org

Add a pg binary path to script
br
Kaido

On Mon, 4 Dec 2023 at 18:13, Alan Hodgson <ahodgson@lists.simkin.ca> wrote:

> On Mon, 2023-12-04 at 11:07 -0500, Ron Johnson wrote:
>
> 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.
>
>
> Is your user and PATH the same? ie. are you running the same vacuumdb
> executable?
>
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: vacuumdb seems not to like option -j when run from crontab
  2023-12-04 16:07 vacuumdb seems not to like option -j when run from crontab Ron Johnson <ronljohnsonjr@gmail.com>
  2023-12-04 16:13 ` Re: vacuumdb seems not to like option -j when run from crontab Alan Hodgson <ahodgson@lists.simkin.ca>
@ 2023-12-04 16:22   ` Ron Johnson <ronljohnsonjr@gmail.com>
  2023-12-05 17:56     ` Re: vacuumdb seems not to like option -j when run from crontab Joshua Drake <jd@commandprompt.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Ron Johnson @ 2023-12-04 16:22 UTC (permalink / raw)
  To: Alan Hodgson <ahodgson@lists.simkin.ca>; +Cc: pgsql-general@lists.postgresql.org

(Sorry for top-posting.  Blame gmail.)

Turns out that PG 8.4.20 is also installed from the RHEL repository.

Thanks.

On Mon, Dec 4, 2023 at 11:13 AM Alan Hodgson <ahodgson@lists.simkin.ca>
wrote:

> On Mon, 2023-12-04 at 11:07 -0500, Ron Johnson wrote:
>
> 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.
>
>
> Is your user and PATH the same? ie. are you running the same vacuumdb
> executable?
>
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: vacuumdb seems not to like option -j when run from crontab
  2023-12-04 16:07 vacuumdb seems not to like option -j when run from crontab Ron Johnson <ronljohnsonjr@gmail.com>
  2023-12-04 16:13 ` Re: vacuumdb seems not to like option -j when run from crontab Alan Hodgson <ahodgson@lists.simkin.ca>
  2023-12-04 16:22   ` Re: vacuumdb seems not to like option -j when run from crontab Ron Johnson <ronljohnsonjr@gmail.com>
@ 2023-12-05 17:56     ` Joshua Drake <jd@commandprompt.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Joshua Drake @ 2023-12-05 17:56 UTC (permalink / raw)
  To: Ron Johnson <ronljohnsonjr@gmail.com>; +Cc: Alan Hodgson <ahodgson@lists.simkin.ca>; pgsql-general@lists.postgresql.org

8.4 does not support -j

On Mon, Dec 4, 2023 at 8:22 AM Ron Johnson <ronljohnsonjr@gmail.com> wrote:

> (Sorry for top-posting.  Blame gmail.)
>
> Turns out that PG 8.4.20 is also installed from the RHEL repository.
>
> Thanks.
>
> On Mon, Dec 4, 2023 at 11:13 AM Alan Hodgson <ahodgson@lists.simkin.ca>
> wrote:
>
>> On Mon, 2023-12-04 at 11:07 -0500, Ron Johnson wrote:
>>
>> 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.
>>
>>
>> Is your user and PATH the same? ie. are you running the same vacuumdb
>> executable?
>>
>>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2023-12-05 17:56 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-12-04 16:07 vacuumdb seems not to like option -j when run from crontab Ron Johnson <ronljohnsonjr@gmail.com>
2023-12-04 16:13 ` Alan Hodgson <ahodgson@lists.simkin.ca>
2023-12-04 16:19   ` kaido vaikla <kaido.vaikla@gmail.com>
2023-12-04 16:22   ` Ron Johnson <ronljohnsonjr@gmail.com>
2023-12-05 17:56     ` Joshua Drake <jd@commandprompt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox