pgsql: Fix assertion failure in heap_vacuum_rel

2023-04-28 Thread Daniel Gustafsson
Fix assertion failure in heap_vacuum_rel Commit 7d71d3dd08 changed resetting the VacuumFailsafeActive flag to an assertion since the flag is reset before starting vacuuming a relation. This however failed to take recursive calls of vacuum_rel() and vacuum of TOAST tables into consideration. Fix by

pgsql: Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements

2023-04-28 Thread Michael Paquier
Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements CREATE SCHEMA AUTHORIZATION with appended schema elements can lead to crashes when comparing the schema name of the query with the schemas used in the qualification of some clauses in the elements' queries. The origin of the problem

pgsql: Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements

2023-04-28 Thread Michael Paquier
Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements CREATE SCHEMA AUTHORIZATION with appended schema elements can lead to crashes when comparing the schema name of the query with the schemas used in the qualification of some clauses in the elements' queries. The origin of the problem

pgsql: Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements

2023-04-28 Thread Michael Paquier
Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements CREATE SCHEMA AUTHORIZATION with appended schema elements can lead to crashes when comparing the schema name of the query with the schemas used in the qualification of some clauses in the elements' queries. The origin of the problem

pgsql: Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements

2023-04-28 Thread Michael Paquier
Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements CREATE SCHEMA AUTHORIZATION with appended schema elements can lead to crashes when comparing the schema name of the query with the schemas used in the qualification of some clauses in the elements' queries. The origin of the problem

pgsql: Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements

2023-04-28 Thread Michael Paquier
Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements CREATE SCHEMA AUTHORIZATION with appended schema elements can lead to crashes when comparing the schema name of the query with the schemas used in the qualification of some clauses in the elements' queries. The origin of the problem

pgsql: Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements

2023-04-28 Thread Michael Paquier
Fix crashes with CREATE SCHEMA AUTHORIZATION and schema elements CREATE SCHEMA AUTHORIZATION with appended schema elements can lead to crashes when comparing the schema name of the query with the schemas used in the qualification of some clauses in the elements' queries. The origin of the problem

pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust

pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust

pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust

pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust

pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust

pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust