When creating an aggregate using the pg_aggregate macro with ParallelOption::Safe the deserial function has the wrong signature.
From: https://www.postgresql.org/docs/current/sql-createaggregate.html
deserialfunc
Deserialize a previously serialized aggregate state back into state_data_type. This function must take two arguments of types bytea and internal, and produce a result of type internal. (Note: the second, internal argument is unused, but is required for type safety reasons.)
Generated is a function with a first argument of Self::State/internal though.
See the (AI generated) reproduction at https://github.com/ibotty/pgrx-internal-parallel-aggregate-bug-repro
When creating an aggregate using the
pg_aggregatemacro withParallelOption::Safethe deserial function has the wrong signature.From: https://www.postgresql.org/docs/current/sql-createaggregate.html
Generated is a function with a first argument of
Self::State/internalthough.See the (AI generated) reproduction at https://github.com/ibotty/pgrx-internal-parallel-aggregate-bug-repro