pgsql: Tweak behavior of pg_stat_activity.leader_pid

2020-07-26 Thread Michael Paquier
Tweak behavior of pg_stat_activity.leader_pid The initial implementation of leader_pid in pg_stat_activity added by b025f32 took the approach to strictly print what a PGPROC entry includes. In short, if a backend has been involved in parallel query at least once, leader_pid would remain set as lo

pgsql: Tweak behavior of pg_stat_activity.leader_pid

2020-07-26 Thread Michael Paquier
Tweak behavior of pg_stat_activity.leader_pid The initial implementation of leader_pid in pg_stat_activity added by b025f32 took the approach to strictly print what a PGPROC entry includes. In short, if a backend has been involved in parallel query at least once, leader_pid would remain set as lo

pgsql: Allocate consecutive blocks during parallel seqscans

2020-07-26 Thread David Rowley
Allocate consecutive blocks during parallel seqscans Previously we would allocate blocks to parallel workers during a parallel sequential scan 1 block at a time. Since other workers were likely to request a block before a worker returns for another block number to work on, this could lead to non-

pgsql: Fix handling of structure for bytea data type in ECPG

2020-07-26 Thread Michael Paquier
Fix handling of structure for bytea data type in ECPG Some code paths dedicated to bytea used the structure for varchar. This did not lead to any actual bugs, as bytea and varchar have the same definition, but it could become a trap if one of these definitions changes for a new feature or a bug f

pgsql: Fix handling of structure for bytea data type in ECPG

2020-07-26 Thread Michael Paquier
Fix handling of structure for bytea data type in ECPG Some code paths dedicated to bytea used the structure for varchar. This did not lead to any actual bugs, as bytea and varchar have the same definition, but it could become a trap if one of these definitions changes for a new feature or a bug f

pgsql: Fix handling of structure for bytea data type in ECPG

2020-07-26 Thread Michael Paquier
Fix handling of structure for bytea data type in ECPG Some code paths dedicated to bytea used the structure for varchar. This did not lead to any actual bugs, as bytea and varchar have the same definition, but it could become a trap if one of these definitions changes for a new feature or a bug f