Bug 2092085

Summary: postgresql fails to build with Python 3.11: plpython test fails with "SystemError: unknown opcode"
Product: [Fedora] Fedora Reporter: Honza Horak <hhorak>
Component: postgresqlAssignee: Filip Januš <fjanus>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anon.amish, devrim, fjanus, hhorak, jmlich83, mhroncok, mkulik, panovotn, pkubat, praiskup, tgl, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-31 18:54:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2016048    

Description Honza Horak 2022-05-31 18:33:15 UTC
Description of problem:
There was one issue reported as bz#2023272 that seems to fixed in the latest release. However, the regression tests fail with PostgreSQL 14.3 when trying with the 3.11 copr build. 

Version-Release number of selected component (if applicable):
postgresql-14.3

How reproducible:
consistently using build with python 3.11 from copr

Steps to Reproduce:
1. set up local mock config with Python 3.11 as described in the copr: https://copr.fedorainfracloud.org/coprs/g/python/python3.11/
2. build postgresql 14.3
3.

Actual results:
=== make failure: src/pl/plpython/regression.diffs ===
diff -U3 /builddir/build/BUILD/postgresql-14.3/src/pl/plpython/expected/python3/plpython_transaction.out /builddir/build/BUILD/postgresql-14.3/src/pl/plpython/results/python3/plpython_transaction.out
--- /builddir/build/BUILD/postgresql-14.3/src/pl/plpython/expected/python3/plpython_transaction.out     2022-05-31 20:02:30.754782055 +0200
+++ /builddir/build/BUILD/postgresql-14.3/src/pl/plpython/results/python3/plpython_transaction.out      2022-05-31 20:02:32.867788655 +0200
@@ -70,10 +70,8 @@
 return 1
 $$;
 SELECT transaction_test3();
-ERROR:  spiexceptions.InvalidTransactionTermination: invalid transaction termination
+ERROR:  SystemError: unknown opcode
 CONTEXT:  Traceback (most recent call last):
-  PL/Python function "transaction_test3", line 2, in <module>
-    plpy.execute("CALL transaction_test1()")
 PL/Python function "transaction_test3"
 SELECT * FROM test1;
  a | b
@@ -88,10 +86,8 @@


Expected results:
build should pass

Additional info:

Comment 2 Honza Horak 2022-05-31 18:54:18 UTC
This issue was actually discussed in bz#2023272 already, so closing this one as duplicate, to keep the discussion in the original place.

*** This bug has been marked as a duplicate of bug 2023272 ***