Postgres db size not reducing after cleanup jobs

105 views
Skip to first unread message

Vibhor Agarwal

unread,
Sep 20, 2023, 5:28:19 AM9/20/23
to AWX Project
Hello Folks,

We are using AWX 15.0.1 .
Even after running the cleanup jobs, don't see the postgres db size reducing.
It continues to increase as new jobs execute.

Kindly let me know if anything is needed manually or some trigger to reduce the db size.

Roberto

unread,
Sep 25, 2023, 6:43:26 PM9/25/23
to awx-p...@googlegroups.com
Hello Vibhor!

How is your AWX database going? Probably you should run the maintenance tasks there like "vacuum full". I had a similar situation with Tower in the past.

The vacuum full takes a long time depending on the size of your database.  

Your AWX 15.0.1 is really an old version and you should be running a Postgresql 10 or minor version, from Postgresql 12 later versions you can count on partitioning tables which improves the cleanup jobs processes a lot. But at least you know what you are doing for partitioning tables, you will need to update your AWX to a recent version which already uses the partitioning feature into the database.

Hope it helps you.

Best regards

Roberto Duarte



--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/0793286e-7568-46cd-b4e0-4da449b18b36n%40googlegroups.com.

Vibhor Agarwal

unread,
Oct 2, 2023, 11:44:29 PM10/2/23
to AWX Project
Thanks for the revert.
Have observed AWX 15.x is the greatest stable version (don't find 17 stable enough) which can be run stand alone as containers.
Post that we need a K8S cluster.
Hence, sticking to it :)

I am not much into DB, could you please help on how to trigger this vacuum?
Which DB to login & similar?
Thanks.

Roberto

unread,
Oct 5, 2023, 10:25:49 AM10/5/23
to awx-p...@googlegroups.com
Hi Vibhor!

The release 15.0.1 was really great, if you can use it yet ... why not!? 😉

The vacuum operation should be executed as a regular maintenance task for Postgresql databases, mainly the ones that are growing a lot.

You can log into your database server as root and run a "su - postgres" to execute it as postgres user, also is good to stop writing into database during the process because it will build some locks when running (stop your AWX services in a maintenance window is the best way I can recommend).

So you can use the wrapper "vaccumdb -a"  for all databases   or "vacuumdb -d awx" for just run into the right AWX database (supposing your AWX database is named "awx", you can check running the "psql -l" command as postgres user). See here the info about the wrapper vacuumdb.


Hope it helps you!

All the best!


--
Roberto C. Duarte



Vibhor Agarwal

unread,
Oct 5, 2023, 11:54:00 PM10/5/23
to AWX Project
Thanks,

> The release 15.0.1 was really great, if you can use it yet ... why not!? 😉
Personally I haven't found any exciting new feature in latest versions that merit a upgrade.
May be you can enlighten me if i have been casual to scan the feature set.

This looks helpful.
Let me try.
Reply all
Reply to author
Forward
0 new messages