Re: pgsql: Use better comment marker in Autoconf input

2019-02-09 Thread Tom Lane
Andres Freund writes: > On 2019-02-09 14:57:27 +, Peter Eisentraut wrote: >> Use better comment marker in Autoconf input > Weirdly enough this might have had some sideeffects. According to > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=elver&dt=2019-02-09%2014%3A58%3A09 > this is w

Re: pgsql: Use better comment marker in Autoconf input

2019-02-09 Thread Andres Freund
Hi, On 2019-02-09 14:57:27 +, Peter Eisentraut wrote: > Use better comment marker in Autoconf input > > The comment marker "#" is copied to the output, so it's only > appropriate for comments that make sense in the shell output. For > comments about the Autoconf language, "dnl" should be use

pgsql: Solve cross-version-upgrade testing problem induced by 1fb57af92

2019-02-09 Thread Tom Lane
Solve cross-version-upgrade testing problem induced by 1fb57af92. Renaming varchar_transform to varchar_support had a side effect I hadn't foreseen: the core regression tests leave around a transform object that relies on that function, so the name change breaks cross-version upgrade tests, becaus

pgsql: Solve cross-version-upgrade testing problem induced by 1fb57af92

2019-02-09 Thread Tom Lane
Solve cross-version-upgrade testing problem induced by 1fb57af92. Renaming varchar_transform to varchar_support had a side effect I hadn't foreseen: the core regression tests leave around a transform object that relies on that function, so the name change breaks cross-version upgrade tests, becaus

pgsql: Solve cross-version-upgrade testing problem induced by 1fb57af92

2019-02-09 Thread Tom Lane
Solve cross-version-upgrade testing problem induced by 1fb57af92. Renaming varchar_transform to varchar_support had a side effect I hadn't foreseen: the core regression tests leave around a transform object that relies on that function, so the name change breaks cross-version upgrade tests, becaus

pgsql: Solve cross-version-upgrade testing problem induced by 1fb57af92

2019-02-09 Thread Tom Lane
Solve cross-version-upgrade testing problem induced by 1fb57af92. Renaming varchar_transform to varchar_support had a side effect I hadn't foreseen: the core regression tests leave around a transform object that relies on that function, so the name change breaks cross-version upgrade tests, becaus

pgsql: Solve cross-version-upgrade testing problem induced by 1fb57af92

2019-02-09 Thread Tom Lane
Solve cross-version-upgrade testing problem induced by 1fb57af92. Renaming varchar_transform to varchar_support had a side effect I hadn't foreseen: the core regression tests leave around a transform object that relies on that function, so the name change breaks cross-version upgrade tests, becaus

pgsql: Repair unsafe/unportable snprintf usage in pg_restore.

2019-02-09 Thread Tom Lane
Repair unsafe/unportable snprintf usage in pg_restore. warn_or_exit_horribly() was blithely passing a potentially-NULL string pointer to a %s format specifier. That works (at least to the extent of not crashing) on some platforms, but not all, and since we switched to our own snprintf.c it doesn'

pgsql: Repair unsafe/unportable snprintf usage in pg_restore.

2019-02-09 Thread Tom Lane
Repair unsafe/unportable snprintf usage in pg_restore. warn_or_exit_horribly() was blithely passing a potentially-NULL string pointer to a %s format specifier. That works (at least to the extent of not crashing) on some platforms, but not all, and since we switched to our own snprintf.c it doesn'

pgsql: Repair unsafe/unportable snprintf usage in pg_restore.

2019-02-09 Thread Tom Lane
Repair unsafe/unportable snprintf usage in pg_restore. warn_or_exit_horribly() was blithely passing a potentially-NULL string pointer to a %s format specifier. That works (at least to the extent of not crashing) on some platforms, but not all, and since we switched to our own snprintf.c it doesn'

pgsql: Repair unsafe/unportable snprintf usage in pg_restore.

2019-02-09 Thread Tom Lane
Repair unsafe/unportable snprintf usage in pg_restore. warn_or_exit_horribly() was blithely passing a potentially-NULL string pointer to a %s format specifier. That works (at least to the extent of not crashing) on some platforms, but not all, and since we switched to our own snprintf.c it doesn'

pgsql: Repair unsafe/unportable snprintf usage in pg_restore.

2019-02-09 Thread Tom Lane
Repair unsafe/unportable snprintf usage in pg_restore. warn_or_exit_horribly() was blithely passing a potentially-NULL string pointer to a %s format specifier. That works (at least to the extent of not crashing) on some platforms, but not all, and since we switched to our own snprintf.c it doesn'

pgsql: Repair unsafe/unportable snprintf usage in pg_restore.

2019-02-09 Thread Tom Lane
Repair unsafe/unportable snprintf usage in pg_restore. warn_or_exit_horribly() was blithely passing a potentially-NULL string pointer to a %s format specifier. That works (at least to the extent of not crashing) on some platforms, but not all, and since we switched to our own snprintf.c it doesn'

pgsql: Build out the planner support function infrastructure.

2019-02-09 Thread Tom Lane
Build out the planner support function infrastructure. Add support function requests for estimating the selectivity, cost, and number of result rows (if a SRF) of the target function. The lack of a way to estimate selectivity of a boolean-returning function in WHERE has been a recognized deficien

pgsql: Create the infrastructure for planner support functions.

2019-02-09 Thread Tom Lane
Create the infrastructure for planner support functions. Rename/repurpose pg_proc.protransform as "prosupport". The idea is still that it names an internal function that provides knowledge to the planner about the behavior of the function it's attached to; but redesign the API specification so th

pgsql: Refactor the representation of indexable clauses in IndexPaths.

2019-02-09 Thread Tom Lane
Refactor the representation of indexable clauses in IndexPaths. In place of three separate but interrelated lists (indexclauses, indexquals, and indexqualcols), an IndexPath now has one list "indexclauses" of IndexClause nodes. This holds basically the same information as before, but in a more us

Re: pgsql: Allow some recovery parameters to be changed with reload

2019-02-09 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Alvaro Herrera writes: > > On 2019-Feb-08, Michael Paquier wrote: > >> The timestamp of this commit is a bit messed up: > >> commit: 13b89f96d07ad3da67b57f66c134c3609bd3e98f > >> author: Peter Eisentraut > >> date: Mon, 4 Feb 2019 09:28:17 +010

pgsql: Call set_rel_pathlist_hook before generate_gather_paths, not aft

2019-02-09 Thread Tom Lane
Call set_rel_pathlist_hook before generate_gather_paths, not after. The previous ordering of these steps satisfied the nominal requirement that set_rel_pathlist_hook could editorialize on the whole set of Paths constructed for a base relation. In practice, though, trying to change the set of part

pgsql: Call set_rel_pathlist_hook before generate_gather_paths, not aft

2019-02-09 Thread Tom Lane
Call set_rel_pathlist_hook before generate_gather_paths, not after. The previous ordering of these steps satisfied the nominal requirement that set_rel_pathlist_hook could editorialize on the whole set of Paths constructed for a base relation. In practice, though, trying to change the set of part

pgsql: Call set_rel_pathlist_hook before generate_gather_paths, not aft

2019-02-09 Thread Tom Lane
Call set_rel_pathlist_hook before generate_gather_paths, not after. The previous ordering of these steps satisfied the nominal requirement that set_rel_pathlist_hook could editorialize on the whole set of Paths constructed for a base relation. In practice, though, trying to change the set of part

pgsql: Call set_rel_pathlist_hook before generate_gather_paths, not aft

2019-02-09 Thread Tom Lane
Call set_rel_pathlist_hook before generate_gather_paths, not after. The previous ordering of these steps satisfied the nominal requirement that set_rel_pathlist_hook could editorialize on the whole set of Paths constructed for a base relation. In practice, though, trying to change the set of part

Re: pgsql: Restrict the use of temporary namespace in two-phase transaction

2019-02-09 Thread Peter Eisentraut
On 08/02/2019 11:00, Michael Paquier wrote: > On Fri, Feb 08, 2019 at 10:41:59AM +0100, Peter Eisentraut wrote: >> We usually don't use "namespace" in user-facing error messages. Can you >> change it to say "temporary schema"? > > Or just switch to "temporary objects" like it's done on HEAD for t

pgsql: Use better comment marker in Autoconf input

2019-02-09 Thread Peter Eisentraut
Use better comment marker in Autoconf input The comment marker "#" is copied to the output, so it's only appropriate for comments that make sense in the shell output. For comments about the Autoconf language, "dnl" should be used. Branch -- master Details --- https://git.postgresql.org/

pgsql: For 11 only, put back heap_expand_tuple to GetTupleForTrigger().

2019-02-09 Thread Andres Freund
For 11 only, put back heap_expand_tuple to GetTupleForTrigger(). This is not necessary anymore after 297d627e, but extensions that have not been recompiled after the fix will not use the new definition of heap_getattr(). While recompiling those extensions is obviously the suggested course, it's ch

pgsql: Allow to reset execGrouping.c style tuple hashtables.

2019-02-09 Thread Andres Freund
Allow to reset execGrouping.c style tuple hashtables. This has the advantage that the comparator expression, the table's slot, etc do not have to be rebuilt. Additionally the simplehash.h hashtable within the tuple hashtable now keeps its previous size and doesn't need to be reallocated. That both

pgsql: Allow to reset execGrouping.c style tuple hashtables.

2019-02-09 Thread Andres Freund
Allow to reset execGrouping.c style tuple hashtables. This has the advantage that the comparator expression, the table's slot, etc do not have to be rebuilt. Additionally the simplehash.h hashtable within the tuple hashtable now keeps its previous size and doesn't need to be reallocated. That both

pgsql: Reset, not recreate, execGrouping.c style hashtables.

2019-02-09 Thread Andres Freund
Reset, not recreate, execGrouping.c style hashtables. This uses the facility added in the preceding commit to fix performance issues caused by rebuilding the hashtable (with its comparator expression being the most expensive bit), after every reset. That's especially important when the comparator

pgsql: simplehash: Add support for resetting a hashtable's contents.

2019-02-09 Thread Andres Freund
simplehash: Add support for resetting a hashtable's contents. A hashtable reset just reset the hashtable entries, but does not free memory. Author: Andres Freund Discussion: https://postgr.es/m/20190114180423.ywhdg2iagzvh4...@alap3.anarazel.de Bug: #15592 #15486 Backpatch: 11, this is a prerequi

pgsql: Plug leak in BuildTupleHashTable by creating ExprContext in corr

2019-02-09 Thread Andres Freund
Plug leak in BuildTupleHashTable by creating ExprContext in correct context. In bf6c614a2f2c5 I added a expr context to evaluate the grouping expression. Unfortunately the code I added initialized them while in the calling context, rather the table context. Additionally, I used CreateExprContext(

pgsql: Plug leak in BuildTupleHashTable by creating ExprContext in corr

2019-02-09 Thread Andres Freund
Plug leak in BuildTupleHashTable by creating ExprContext in correct context. In bf6c614a2f2c5 I added a expr context to evaluate the grouping expression. Unfortunately the code I added initialized them while in the calling context, rather the table context. Additionally, I used CreateExprContext(

pgsql: Reset, not recreate, execGrouping.c style hashtables.

2019-02-09 Thread Andres Freund
Reset, not recreate, execGrouping.c style hashtables. This uses the facility added in the preceding commit to fix performance issues caused by rebuilding the hashtable (with its comparator expression being the most expensive bit), after every reset. That's especially important when the comparator

pgsql: simplehash: Add support for resetting a hashtable's contents.

2019-02-09 Thread Andres Freund
simplehash: Add support for resetting a hashtable's contents. A hashtable reset just reset the hashtable entries, but does not free memory. Author: Andres Freund Discussion: https://postgr.es/m/20190114180423.ywhdg2iagzvh4...@alap3.anarazel.de Bug: #15592 #15486 Backpatch: 11, this is a prerequi