Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 792537 - dev-db/postgresql-13.3 - plperl functions broken with dev-lang/perl-5.32.1
Summary: dev-db/postgresql-13.3 - plperl functions broken with dev-lang/perl-5.32.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: perl-5.32
  Show dependency tree
 
Reported: 2021-05-27 18:39 UTC by Chris Mayo
Modified: 2024-05-11 03:01 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Mayo 2021-05-27 18:39:47 UTC
Fix introduced in [1]:
plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'

now causes plperl functions to fail with:
ERROR:  attempt to redefine parameter "plperl.use_strict" 

which is an unhelpful error message indicating a missing module [2].
utf8_heavy.pl has been dropped by Perl [3].

Original example code from [1] now runs fine for me without defining plperl.on_init.

[1] https://bugs.gentoo.org/518522
[2] https://www.postgresql.org/message-id/E1U66cu-0004dL-Qg@wrigleys.postgresql.org
[3] https://github.com/Perl/perl5/commit/483a80b4eb1ce75c33945f69455138be14944460
Comment 1 Chris Wood 2023-12-15 01:28:11 UTC
When migrating from 15 to 16 this default config setting causes the process to fail if any database makes use of plperl or plperlu with the following error:
could not load library "$libdir/plperl": ERROR:  
CONTEXT:  while running Perl initialization

updating the config to the below prevents the issue.
plperl.on_init = 'use utf8; use re; package utf8;'

However I do not know what the impact of this change is and if Unicode::UCD should replace utf8_heavy.pl.
Comment 2 Larry the Git Cow gentoo-dev 2024-05-11 02:36:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=433856b93366defbd2ef42e55bf474c6d7f25ecf

commit 433856b93366defbd2ef42e55bf474c6d7f25ecf
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-05-11 02:32:01 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-11 02:32:01 +0000

    dev-db/postgresql: drop old Perl workaround
    
    The code being removed here can't work with modern Perl:
    ```
    $ perl -e 'use utf8; use re; package utf8; require "utf8_heavy.pl";';
    Can't locate utf8_heavy.pl in @INC (@INC entries checked: /etc/perl /usr/local/lib64/perl5/5.38/x86_64-linux /usr/local/lib64/perl5/5.38 /usr/lib64/perl5/vendor_perl/5.38/x86_64-linux /usr/lib64/perl5/vendor_perl/5.38 /usr/lib64/perl5/5.38/x86_64-linux /usr/lib64/perl5/5.38) at -e line 1.
    ```
    
    The original reporter of the bug it was added for (bug #518522) was Chris Mayo
    who can't reproduce the original problem. Given it now actively causes an issue,
    let's drop it, and not worry about replacing it with something else right now -
    it's unclear anything is needed now.
    
    This still leaves pollution in postgresql.conf - which I leave to the pgsql
    maintainers to resolve, but at least we're not adding it for new installs now.
    
    Note that it's likely https://bugs.gentoo.org/518522#c6 was still an issue
    and this will be resolved now too.
    
    Bug: https://bugs.gentoo.org/518522
    Bug: https://bugs.gentoo.org/792537
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/postgresql/postgresql-12.18.ebuild    | 7 -------
 dev-db/postgresql/postgresql-12.19-r1.ebuild | 7 -------
 dev-db/postgresql/postgresql-13.14.ebuild    | 7 -------
 dev-db/postgresql/postgresql-13.15-r1.ebuild | 7 -------
 dev-db/postgresql/postgresql-14.11.ebuild    | 7 -------
 dev-db/postgresql/postgresql-14.12-r1.ebuild | 7 -------
 dev-db/postgresql/postgresql-15.6.ebuild     | 7 -------
 dev-db/postgresql/postgresql-15.7-r1.ebuild  | 7 -------
 dev-db/postgresql/postgresql-16.2.ebuild     | 7 -------
 dev-db/postgresql/postgresql-16.3-r1.ebuild  | 7 -------
 dev-db/postgresql/postgresql-9999.ebuild     | 7 -------
 11 files changed, 77 deletions(-)