You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we update extensions by changing version in the Dockerfile.compute-node.
It is hard to tell, if new extension binary works with objects created by previous version.
DoD
We have test coverage that allows us to perform extension updates safely.
Implementation ideas
First idea is to add CREATE EXTENSION for all available extensions to backward_compatibility snapshot.
This will help to catch simple cases, when extension is missing in the new image.
Testing backward compatibility is a very broad task, because extension may create lots of SQL objects (functions, tables, views) and change their signatures and internal logic arbitrary. One thing that is relatively easy to test is that new .so has all the functions, needed for previously installed version of extension. We can compare function signatures using query like this and comparing results before and after image update:
SELECT e.extname, p.proname, p.proargtypes, p.prorettype
FROM pg_catalog.pg_extension AS e
INNER JOIN pg_catalog.pg_depend AS d ON (d.refobjid = e.oid)
INNER JOIN pg_catalog.pg_proc AS p ON (p.oid = d.objid)
WHERE d.deptype = 'e'
ORDER BY e.extname, p.proname;
We can also run ALTER EXTENSION extname UPDATE on a backward compatibility snapshot data, to ensure that update path is present.
This probably won't work for some extensions, test DROP extension + CREATE extension for them.
Other related tasks and Epics
need review from @neondatabase/developer-productivity
Ideas are welcome.
Questions:
Is it a good place to add such test?
Do we only run this test for release branch PRs? Can we also run it for normal PRs that change Dokerfile.compute-node?
The text was updated successfully, but these errors were encountered:
Add backward compatibility tests which we could use when we want to bump version from N to M
part of https://github.com/neondatabase/company_projects/issues/291
Motivation
Currently, we update extensions by changing version in the Dockerfile.compute-node.
It is hard to tell, if new extension binary works with objects created by previous version.
DoD
We have test coverage that allows us to perform extension updates safely.
Implementation ideas
First idea is to add
CREATE EXTENSION
for all available extensions to backward_compatibility snapshot.This will help to catch simple cases, when extension is missing in the new image.
Testing backward compatibility is a very broad task, because extension may create lots of SQL objects (functions, tables, views) and change their signatures and internal logic arbitrary. One thing that is relatively easy to test is that new
.so
has all the functions, needed for previously installed version of extension. We can compare function signatures using query like this and comparing results before and after image update:ALTER EXTENSION extname UPDATE
on a backward compatibility snapshot data, to ensure that update path is present.This probably won't work for some extensions, test
DROP extension + CREATE extension
for them.Other related tasks and Epics
need review from @neondatabase/developer-productivity
Ideas are welcome.
Questions:
release
branch PRs? Can we also run it for normal PRs that changeDokerfile.compute-node
?The text was updated successfully, but these errors were encountered: