FULL AI ANALYSIS

PostgreSQL plperl functions crash server backend with SIGSEGV after system Perl upgrade

Generated Oct 13, 2026, 9:45:52 AM

Analysis summary

plperl embeds the system Perl interpreter; a Perl ABI change (major version jump) causes plperl's compiled shared object to call into incompatible symbols, producing SIGSEGV. The staging rebuild fixing the issue points to ABI mismatch between plperl and system Perl. Safe remediation paths: rebuild plperl against the current Perl (preferred), use a database package built for the current distro Perl, or avoid plperl by refactoring functions into PL/pgSQL or external services. Downgrading system Perl can break other packages and is high risk.

Possible causes

ABI incompatibility between plperl shared object and upgraded system Perl (symbol/struct layout changed).

95%

Packaged PostgreSQL plperl built against older Perl and not compatible with the vendor Perl update.

90%

Multiple libperl versions present and runtime linking resolving to wrong SONAME due to LD_LIBRARY_PATH or rpath differences.

40%

Third-party Perl XS modules used by plperl function not compiled for new Perl version.

20%

Suggested fixes

1

Diagnostic step 1

Do not edit or delete database files. Collect evidence: copy core file and run gdb on a staging replica to produce a backtrace; capture 'ldd $(pg_config --pkglibdir)/plperl.so' to see linked libperl path.

2

Diagnostic step 2

Build and test a plperl.so on an isolated staging node against the current system Perl and run the failing functions there. If successful, plan a production rebuild and package the module as an RPM for consistent rollout.

3

Diagnostic step 3

If rebuilding in-place is not possible immediately, create safe bypass by migrating critical plperl procedures to SQL/PLpgSQL or an external microservice to reduce immediate crash surface.

4

Diagnostic step 4

Avoid downgrading system Perl on production unless you can verify no other packages depend on the newer Perl; prefer rebuilding plperl or using vendor-provided PostgreSQL package compiled for the current Perl.

5

Diagnostic step 5

If the vendor PostgreSQL RPMs are available for the new Perl, consider upgrading PostgreSQL packages atomically during maintenance window. Escalate to OS or database vendor support if packaging constraints prevent rebuilding safely.