Re: pgsql: Make Vars be outer-join-aware.

2023-01-30 Thread Robins Tharakan
Hi Tom, On Tue, 31 Jan 2023 at 05:43, Tom Lane wrote: > > Make Vars be outer-join-aware. > Since this commit, my test setup is triggering asserts every few minutes. The repro SQL itself doesn't make much sense, but it's the smallest I could narrow it down to: create table t1(a int); create tab

pgsql: Generate code for query jumbling through gen_node_support.pl

2023-01-30 Thread Michael Paquier
Generate code for query jumbling through gen_node_support.pl This commit changes the query jumbling code in queryjumblefuncs.c to be generated automatically based on the information of the nodes in the headers of src/include/nodes/ by using gen_node_support.pl. This approach offers many advantage

pgsql: Remove recovery test 011_crash_recovery.pl

2023-01-30 Thread Michael Paquier
Remove recovery test 011_crash_recovery.pl This test has been added as of 857ee8e that has introduced the SQL function txid_status(), with the purpose of checking that a transaction ID still in-progress during a crash is correctly marked as aborted after recovery finishes. This test is unstable,

pgsql: Remove recovery test 011_crash_recovery.pl

2023-01-30 Thread Michael Paquier
Remove recovery test 011_crash_recovery.pl This test has been added as of 857ee8e that has introduced the SQL function txid_status(), with the purpose of checking that a transaction ID still in-progress during a crash is correctly marked as aborted after recovery finishes. This test is unstable,

pgsql: Remove recovery test 011_crash_recovery.pl

2023-01-30 Thread Michael Paquier
Remove recovery test 011_crash_recovery.pl This test has been added as of 857ee8e that has introduced the SQL function txid_status(), with the purpose of checking that a transaction ID still in-progress during a crash is correctly marked as aborted after recovery finishes. This test is unstable,

pgsql: Remove recovery test 011_crash_recovery.pl

2023-01-30 Thread Michael Paquier
Remove recovery test 011_crash_recovery.pl This test has been added as of 857ee8e that has introduced the SQL function txid_status(), with the purpose of checking that a transaction ID still in-progress during a crash is correctly marked as aborted after recovery finishes. This test is unstable,

pgsql: Remove recovery test 011_crash_recovery.pl

2023-01-30 Thread Michael Paquier
Remove recovery test 011_crash_recovery.pl This test has been added as of 857ee8e that has introduced the SQL function txid_status(), with the purpose of checking that a transaction ID still in-progress during a crash is correctly marked as aborted after recovery finishes. This test is unstable,

pgsql: Remove recovery test 011_crash_recovery.pl

2023-01-30 Thread Michael Paquier
Remove recovery test 011_crash_recovery.pl This test has been added as of 857ee8e that has introduced the SQL function txid_status(), with the purpose of checking that a transaction ID still in-progress during a crash is correctly marked as aborted after recovery finishes. This test is unstable,

pgsql: Refactor rmtree() to use get_dirent_type().

2023-01-30 Thread Thomas Munro
Refactor rmtree() to use get_dirent_type(). Switch to get_dirent_type() instead of lstat() while traversing a directory tree, to see if that fixes the intermittent ENOTEMPTY failures seen in recent pg_upgrade tests, on Windows CI. While refactoring, also use AllocateDir() instead of opendir() in

pgsql: Make Vars be outer-join-aware.

2023-01-30 Thread Tom Lane
Make Vars be outer-join-aware. Traditionally we used the same Var struct to represent the value of a table column everywhere in parse and plan trees. This choice predates our support for SQL outer joins, and it's really a pretty bad idea with outer joins, because the Var's value can depend on whe

pgsql: Do assorted mop-up in the planner.

2023-01-30 Thread Tom Lane
Do assorted mop-up in the planner. Remove RestrictInfo.nullable_relids, along with a good deal of infrastructure that calculated it. One use-case for it was in join_clause_is_movable_to, but we can now replace that usage with a check to see if the clause's relids include any outer join that can n

pgsql: Invent "join domains" to replace the below_outer_join hack.

2023-01-30 Thread Tom Lane
Invent "join domains" to replace the below_outer_join hack. EquivalenceClasses are now understood as applying within a "join domain", which is a set of inner-joined relations (possibly underneath an outer join). We no longer need to treat an EC from below an outer join as a second-class citizen.

pgsql: Doc: clarify behavior of boolean options in replication commands

2023-01-30 Thread Tom Lane
Doc: clarify behavior of boolean options in replication commands. defGetBoolean() allows the "value" part of "option = value" syntax to be omitted, in which case it's taken as "true". This is acknowledged in our syntax summaries for relevant commands, but we don't seem to have documented the actua

pgsql: Ensure that MERGE recomputes GENERATED expressions properly.

2023-01-30 Thread Dean Rasheed
Ensure that MERGE recomputes GENERATED expressions properly. This fixes a bug that, under some circumstances, would cause MERGE to fail to properly recompute expressions for GENERATED STORED columns. Formerly, ExecInitModifyTable() did not call ExecInitStoredGenerated() for a MERGE command, which

pgsql: Ensure that MERGE recomputes GENERATED expressions properly.

2023-01-30 Thread Dean Rasheed
Ensure that MERGE recomputes GENERATED expressions properly. This fixes a bug that, under some circumstances, would cause MERGE to fail to properly recompute expressions for GENERATED STORED columns. Formerly, ExecInitModifyTable() did not call ExecInitStoredGenerated() for a MERGE command, which