pgsql: Mark a few logical decoding related variables with PGDLLIMPORT.

2020-08-14 Thread Amit Kapila
Mark a few logical decoding related variables with PGDLLIMPORT. Commit 7259736a6e added two variables CheckXidAlive and bsysscan to detect concurrent aborts and used these in inline functions that are part of the API that can be used by extensions. So it is better to mark them with PGDLLIMPORT. R

pgsql: Be more careful about the shape of hashable subplan clauses.

2020-08-14 Thread Tom Lane
Be more careful about the shape of hashable subplan clauses. nodeSubplan.c expects that the testexpr for a hashable ANY SubPlan has the form of one or more OpExprs whose LHS is an expression of the outer query's, while the RHS is an expression over Params representing output columns of the subquer

pgsql: Be more careful about the shape of hashable subplan clauses.

2020-08-14 Thread Tom Lane
Be more careful about the shape of hashable subplan clauses. nodeSubplan.c expects that the testexpr for a hashable ANY SubPlan has the form of one or more OpExprs whose LHS is an expression of the outer query's, while the RHS is an expression over Params representing output columns of the subquer

pgsql: Be more careful about the shape of hashable subplan clauses.

2020-08-14 Thread Tom Lane
Be more careful about the shape of hashable subplan clauses. nodeSubplan.c expects that the testexpr for a hashable ANY SubPlan has the form of one or more OpExprs whose LHS is an expression of the outer query's, while the RHS is an expression over Params representing output columns of the subquer

pgsql: Be more careful about the shape of hashable subplan clauses.

2020-08-14 Thread Tom Lane
Be more careful about the shape of hashable subplan clauses. nodeSubplan.c expects that the testexpr for a hashable ANY SubPlan has the form of one or more OpExprs whose LHS is an expression of the outer query's, while the RHS is an expression over Params representing output columns of the subquer

pgsql: Be more careful about the shape of hashable subplan clauses.

2020-08-14 Thread Tom Lane
Be more careful about the shape of hashable subplan clauses. nodeSubplan.c expects that the testexpr for a hashable ANY SubPlan has the form of one or more OpExprs whose LHS is an expression of the outer query's, while the RHS is an expression over Params representing output columns of the subquer

pgsql: Be more careful about the shape of hashable subplan clauses.

2020-08-14 Thread Tom Lane
Be more careful about the shape of hashable subplan clauses. nodeSubplan.c expects that the testexpr for a hashable ANY SubPlan has the form of one or more OpExprs whose LHS is an expression of the outer query's, while the RHS is an expression over Params representing output columns of the subquer

pgsql: Be more careful about the shape of hashable subplan clauses.

2020-08-14 Thread Tom Lane
Be more careful about the shape of hashable subplan clauses. nodeSubplan.c expects that the testexpr for a hashable ANY SubPlan has the form of one or more OpExprs whose LHS is an expression of the outer query's, while the RHS is an expression over Params representing output columns of the subquer

pgsql: snapshot scalability: Move subxact info to ProcGlobal, remove PG

2020-08-14 Thread Andres Freund
snapshot scalability: Move subxact info to ProcGlobal, remove PGXACT. Similar to the previous changes this increases the chance that data frequently needed by GetSnapshotData() stays in l2 cache. In many workloads subtransactions are very rare, and this makes the check for that considerably cheape

pgsql: snapshot scalability: Introduce dense array of in-progress xids.

2020-08-14 Thread Andres Freund
snapshot scalability: Introduce dense array of in-progress xids. The new array contains the xids for all connected backends / in-use PGPROC entries in a dense manner (in contrast to the PGPROC/PGXACT arrays which can have unused entries interspersed). This improves performance because GetSnapshot

pgsql: snapshot scalability: Move PGXACT->vacuumFlags to ProcGlobal->va

2020-08-14 Thread Andres Freund
snapshot scalability: Move PGXACT->vacuumFlags to ProcGlobal->vacuumFlags. Similar to the previous commit this increases the chance that data frequently needed by GetSnapshotData() stays in l2 cache. As we now take care to not unnecessarily write to ProcGlobal->vacuumFlags, there should be very fe

pgsql: pg_dump: fix dependencies on FKs to partitioned tables

2020-08-14 Thread Alvaro Herrera
pg_dump: fix dependencies on FKs to partitioned tables Parallel-restoring a foreign key that references a partitioned table with several levels of partitions can fail: pg_restore: while PROCESSING TOC: pg_restore: from TOC entry 6684; 2606 29166 FK CONSTRAINT fk fk_a_fkey postgres pg_restore: err

pgsql: pg_dump: fix dependencies on FKs to partitioned tables

2020-08-14 Thread Alvaro Herrera
pg_dump: fix dependencies on FKs to partitioned tables Parallel-restoring a foreign key that references a partitioned table with several levels of partitions can fail: pg_restore: while PROCESSING TOC: pg_restore: from TOC entry 6684; 2606 29166 FK CONSTRAINT fk fk_a_fkey postgres pg_restore: err

pgsql: pg_dump: fix dependencies on FKs to partitioned tables

2020-08-14 Thread Alvaro Herrera
pg_dump: fix dependencies on FKs to partitioned tables Parallel-restoring a foreign key that references a partitioned table with several levels of partitions can fail: pg_restore: while PROCESSING TOC: pg_restore: from TOC entry 6684; 2606 29166 FK CONSTRAINT fk fk_a_fkey postgres pg_restore: err

pgsql: Fix obsolete comment in xlogutils.c.

2020-08-14 Thread Peter Geoghegan
Fix obsolete comment in xlogutils.c. Oversight in commit 2c03216d831. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/914140e85a79c63853c86334afa2d7e6e930c11a Modified Files -- src/backend/access/transam/xlogutils.c | 7 +++ 1 file changed, 3 inserti

pgsql: Fix postmaster's behavior during smart shutdown.

2020-08-14 Thread Tom Lane
Fix postmaster's behavior during smart shutdown. Up to now, upon receipt of a SIGTERM ("smart shutdown" command), the postmaster has immediately killed all "optional" background processes, and subsequently refused to launch new ones while it's waiting for foreground client processes to exit. No d

pgsql: Fix postmaster's behavior during smart shutdown.

2020-08-14 Thread Tom Lane
Fix postmaster's behavior during smart shutdown. Up to now, upon receipt of a SIGTERM ("smart shutdown" command), the postmaster has immediately killed all "optional" background processes, and subsequently refused to launch new ones while it's waiting for foreground client processes to exit. No d

pgsql: Fix postmaster's behavior during smart shutdown.

2020-08-14 Thread Tom Lane
Fix postmaster's behavior during smart shutdown. Up to now, upon receipt of a SIGTERM ("smart shutdown" command), the postmaster has immediately killed all "optional" background processes, and subsequently refused to launch new ones while it's waiting for foreground client processes to exit. No d

pgsql: Fix postmaster's behavior during smart shutdown.

2020-08-14 Thread Tom Lane
Fix postmaster's behavior during smart shutdown. Up to now, upon receipt of a SIGTERM ("smart shutdown" command), the postmaster has immediately killed all "optional" background processes, and subsequently refused to launch new ones while it's waiting for foreground client processes to exit. No d

pgsql: Fix postmaster's behavior during smart shutdown.

2020-08-14 Thread Tom Lane
Fix postmaster's behavior during smart shutdown. Up to now, upon receipt of a SIGTERM ("smart shutdown" command), the postmaster has immediately killed all "optional" background processes, and subsequently refused to launch new ones while it's waiting for foreground client processes to exit. No d

pgsql: Fix postmaster's behavior during smart shutdown.

2020-08-14 Thread Tom Lane
Fix postmaster's behavior during smart shutdown. Up to now, upon receipt of a SIGTERM ("smart shutdown" command), the postmaster has immediately killed all "optional" background processes, and subsequently refused to launch new ones while it's waiting for foreground client processes to exit. No d

pgsql: Fix typo in test comment.

2020-08-14 Thread Heikki Linnakangas
Fix typo in test comment. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f81167adbf7414f3ce7baa12e0894501db68f73f Modified Files -- src/test/regress/expected/stats_ext.out | 2 +- src/test/regress/sql/stats_ext.sql | 2 +- 2 files changed, 2 i

pgsql: Fix typo in test comment.

2020-08-14 Thread Heikki Linnakangas
Fix typo in test comment. Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/cabec1dbdf405211c1a4d30f52a91e8de2cf7226 Modified Files -- src/test/regress/expected/stats_ext.out | 2 +- src/test/regress/sql/stats_ext.sql | 2 +- 2 files changed, 2 i

pgsql: Fix typo in test comment.

2020-08-14 Thread Heikki Linnakangas
Fix typo in test comment. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5bdf694568ef0b9eebef32002a9ebc1918dd0b4b Modified Files -- src/test/regress/expected/stats_ext.out | 2 +- src/test/regress/sql/stats_ext.sql | 2 +- 2 files changed, 2 insertio