AWX job_id integer max value 2147483647?

Hello!

I was curious about the job_id parameter in AWX, in the postgresql database specifically. I tried to gather information on this myself and I believe I’ve arrived at the conclusion that job_id in the main_activitystream_job table is an integer numeric type, and so per PostgreSQL: Documentation: 16: 8.1. Numeric Types the highest job_id would be 2147483647.

If the job_id exceeds this, does anyone know what happens at 2147483648?

I appreciate any info, thank you!

1 Like

Sorry to bump this thread, but I’m just looking for confirmation on what I think is true is true.

If an AWX instance were to run out of job_id numbers, what recourse would a poor soul have to remediate that?

Just a theorical answer, as there might be some checks in AWX which might handle - or not - this situation.

That being said, postgresql whould throw an “integer out of range” error.

In theory, you could use an ‘alter table’ sql command to convert the column to bigint data type. But once again, we don’t know how AWX code woul deal with that and how existing data would be affected.

A client creating roughly 150000 jobs every month would, event at that rate, need more than 1100 years to exhaust the possible number of jobs ids. So I’m a bit afraid to ask if you think you could exhaust this range quickier ? :slight_smile:

2 Likes

Nah, don’t think it’s likely, but just wanted to be sure since I see one of our instances is already around job ID 1.6 million. I’m not a huge Postgres guy, when you talk about a toast vacuum it makes me think of crumbs under the toaster in the kitchen, so I’m not exactly sure of what I’m seeing being correct. Appreciate the answer!

1.6 million is around 1/1000 of the available range for an integer (which is 2^31, as it’s signed).

Rewriting the table works, and unless AWX does also query the datatype, this will be transparent. But it will lock and rewrite the entire table. Downtime for AWX included.

2 Likes

Hopefully I’ll be retired before 1000 years then

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.