pgsql: doc: Expand recursive query documentation

2020-10-12 Thread Peter Eisentraut
doc: Expand recursive query documentation Break the section up with subsection headings. Add examples for depth- and breadth-first search ordering. For consistency with the SQL search clause, start the depth counting at 0 instead of 1 in the examples. Discussion: https://www.postgresql.org/mes

Re: pgsql: Add tests for logical replication spilled stats.

2020-10-12 Thread Amit Kapila
On Tue, Oct 13, 2020 at 8:32 AM Amit Kapila wrote: > > Add tests for logical replication spilled stats. > It seems these tests are not stable. I see failure in one of the BF [1]. I am analyzing it and started a discussion on the pgsql-hackers thread. [1] - https://buildfarm.postgresql.org/cgi-b

pgsql: Add tests for logical replication spilled stats.

2020-10-12 Thread Amit Kapila
Add tests for logical replication spilled stats. Commit 9868167500 added a mechanism to track statistics corresponding to the spilling of changes from ReorderBuffer but didn't add any tests. Author: Amit Kapila and Sawada Masahiko Discussion: https://postgr.es/m/ca+fd4k5_ppayrtdro2pbttoe0ehqpbvu

pgsql: Fix GiST buffering build to work when there are included columns

2020-10-12 Thread Tom Lane
Fix GiST buffering build to work when there are included columns. gistRelocateBuildBuffersOnSplit did not get the memo about which attribute count to use. This could lead to a crash if there were included columns and buffering build was chosen. (Because there are random page-split decisions else

pgsql: Fix GiST buffering build to work when there are included columns

2020-10-12 Thread Tom Lane
Fix GiST buffering build to work when there are included columns. gistRelocateBuildBuffersOnSplit did not get the memo about which attribute count to use. This could lead to a crash if there were included columns and buffering build was chosen. (Because there are random page-split decisions else

pgsql: Fix GiST buffering build to work when there are included columns

2020-10-12 Thread Tom Lane
Fix GiST buffering build to work when there are included columns. gistRelocateBuildBuffersOnSplit did not get the memo about which attribute count to use. This could lead to a crash if there were included columns and buffering build was chosen. (Because there are random page-split decisions else

pgsql: Re-allow testing of GiST buffered builds.

2020-10-12 Thread Tom Lane
Re-allow testing of GiST buffered builds. Commit 16fa9b2b3 broke the ability to reliably test GiST buffered builds, because it caused sorted builds to be done instead if sortsupport is available, regardless of any attempt to override that. While a would-be test case could try to work around that

pgsql: Fix memory leak when guc.c decides a setting can't be applied no

2020-10-12 Thread Tom Lane
Fix memory leak when guc.c decides a setting can't be applied now. The prohibitValueChange code paths in set_config_option(), which are executed whenever we re-read a PGC_POSTMASTER variable from postgresql.conf, neglected to free anything before exiting. Thus we'd leak the proposed new value of

pgsql: Fix memory leak when guc.c decides a setting can't be applied no

2020-10-12 Thread Tom Lane
Fix memory leak when guc.c decides a setting can't be applied now. The prohibitValueChange code paths in set_config_option(), which are executed whenever we re-read a PGC_POSTMASTER variable from postgresql.conf, neglected to free anything before exiting. Thus we'd leak the proposed new value of

pgsql: Fix memory leak when guc.c decides a setting can't be applied no

2020-10-12 Thread Tom Lane
Fix memory leak when guc.c decides a setting can't be applied now. The prohibitValueChange code paths in set_config_option(), which are executed whenever we re-read a PGC_POSTMASTER variable from postgresql.conf, neglected to free anything before exiting. Thus we'd leak the proposed new value of

pgsql: Fix memory leak when guc.c decides a setting can't be applied no

2020-10-12 Thread Tom Lane
Fix memory leak when guc.c decides a setting can't be applied now. The prohibitValueChange code paths in set_config_option(), which are executed whenever we re-read a PGC_POSTMASTER variable from postgresql.conf, neglected to free anything before exiting. Thus we'd leak the proposed new value of

pgsql: Fix memory leak when guc.c decides a setting can't be applied no

2020-10-12 Thread Tom Lane
Fix memory leak when guc.c decides a setting can't be applied now. The prohibitValueChange code paths in set_config_option(), which are executed whenever we re-read a PGC_POSTMASTER variable from postgresql.conf, neglected to free anything before exiting. Thus we'd leak the proposed new value of

pgsql: Fix memory leak when guc.c decides a setting can't be applied no

2020-10-12 Thread Tom Lane
Fix memory leak when guc.c decides a setting can't be applied now. The prohibitValueChange code paths in set_config_option(), which are executed whenever we re-read a PGC_POSTMASTER variable from postgresql.conf, neglected to free anything before exiting. Thus we'd leak the proposed new value of

pgsql: Fix memory leak when guc.c decides a setting can't be applied no

2020-10-12 Thread Tom Lane
Fix memory leak when guc.c decides a setting can't be applied now. The prohibitValueChange code paths in set_config_option(), which are executed whenever we re-read a PGC_POSTMASTER variable from postgresql.conf, neglected to free anything before exiting. Thus we'd leak the proposed new value of

pgsql: Minor cleanup for win32stat.c.

2020-10-12 Thread Tom Lane
Minor cleanup for win32stat.c. Use GetLastError(), rather than assuming that CreateFile() failure must map to ENOENT. Noted by Michael Paquier. Discussion: https://postgr.es/m/cac+axb0g44sbvspc86o_1hwh8tau2pzrmrw6tjt-dkijotx...@mail.gmail.com Branch -- master Details --- https://git.p

pgsql: Fix compilation warning in unicode_norm.c

2020-10-12 Thread Michael Paquier
Fix compilation warning in unicode_norm.c 80f8eb7 has introduced in unicode_norm.c some new code that uses htonl(). On at least some FreeBSD environments, it is possible to find that this function is undeclared, causing a compilation warning. It is worth noting that no buildfarm members have rep

pgsql: Fix estimates for ModifyTable paths without RETURNING.

2020-10-12 Thread Thomas Munro
Fix estimates for ModifyTable paths without RETURNING. In the past, we always estimated that a ModifyTable node would emit the same number of rows as its subpaths. Without a RETURNING clause, the correct estimate is zero. Fix, in preparation for a proposed parallel write patch that is sensitive