|From:||"Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>|
|Subject:||Is a UDF binary portable across different minor releases and PostgreSQL distributions?|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
While I was thinking of application binary compatibility between PostgreSQL releases, some questions arose about C language user-defined functions (UDFs) and extensions that depend on them.
Can the same UDF binary be used with different PostgreSQL minor releases? If it is, is it a defined policy (e.g. written somewhere in the manual, wiki, documentation in the source code)?
For example, suppose you build a UDF X (some_extension.so/dll) with PostgreSQL 9.5.0. Can I use the binary with PostgreSQL 9.5.x without rebuilding?
Here, the UDF references the contents of server-side data structures, like pgstattuple accesses the members of HeapScanData. If some bug fix of PostgreSQL changes the member layout of those structures, the UDF binary would possibly misbehave. Basically, should all UDFs be rebuilt with the new minor release? Or, are PostgreSQL developers aware of such incompatibility and careful not to change data structure layout?
Can the same UDF binary be used with different PostgreSQL distributions (EnterpriseDB, OpenSCG, RHEL packages, etc.)? Or should the UDF be built with the target distribution?
I guess the rebuild is necessary if the distribution modified the source code of PostgreSQL. That is, the UDF binary built with the bare PostgreSQL cannot be used with EnterpriseDB's advanced edition, which may modify various data structures.
How about other distributions which probably don't modify the source code? Should the UDF be built with the target PostgreSQL because configure options may differ, which affects data structures?
|Next Message||Michael Paquier||2016-07-01 00:46:48||Re: primary_conninfo missing from pg_stat_wal_receiver|
|Previous Message||Andreas Karlsson||2016-07-01 00:27:03||Re: OpenSSL 1.1 breaks configure and more|