Postgres 16 CI / Postgres 16 in use?

I found an unusual issue where tests failed with Postgres 16 if server-side bindings were enabled.

The specific issue in trac is here: #35734 (Tests fail with Postgres 16 and server side bindings) – Django

I believe the status quo is to only run the test suite against the “minimum” postgres version, which is currently Postrgres 14.

The question I have is: Does it make sense to update the continuous integration to explicitly run the test suite against Postgres 15 & 16?

It would have caught this one particular error, but I’m not sure it’s worth the added resource consumption. I think if a large percentage of django users are using postgres 15/16, maybe it might make sense. Some sort of poll or data collection might be useful here.

Thank you @john-parton for starting this conversation. I think that if we have code that performs one logic block for postgresql 16 and another logic block for older versions, it would be great if we can have tests run against the two paths.

I’ll wait for further feedback, but my plan would be to grow the scheduled tests (GitHub Action) to include test runs on linux for the older and newer postgresql versions we support. I guess we also need a test run using server side cursors?

I believe server-side binding is already tested separately

I’m not sure where that’s actually configured, but it does appear to run with the normal tests.

+1 for the selifsh reason that If Django tests against more postgres versions it relieves some of the burden on third-party libraries to assess their postgres compatibility.

1 Like

Created a proposal at Refs #35734 -- Added new entry to scheduled tests workflow to test all supported PostgreSQL versions. by nessita · Pull Request #18592 · django/django · GitHub

Personally, I think it’s a bit of wasteful :deciduous_tree: and :zap: to catch a single small regression per year in an “experimental” feature (as server side binding is described in our docs) :person_shrugging:

(rhetorical question) Are we also going to test against 15 different MariaDB versions, dozens of SQLite versions, or hundreds of GIS library combinations, that we currently officially support? :wink: I know, I know, according to the last Django survey, PostgreSQL is the most popular, etc.

My 2 :coin:

Highest and lowest supported versions only might be a nice compromise (and set a reasonable precedent).

Thank you everyone. I agree that lowest and highest makes sense. Adjusted my PR accordingly.
The failures reported by John are already showing for PG 16 + server side bindings.

The scheduled tests ran and failed as expected for PG 16 + server side bindings:

:muscle:

2 Likes