pgsql: Add more infinite recursion detection while locking a view.

2018-04-17 Thread Tatsuo Ishii
Add more infinite recursion detection while locking a view. Also add regression test cases for detecting infinite recursion in locking view tests. Some document enhancements. Patch by Yugo Nagata. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/03030512d1e4df78dc25

pgsql: Add more temporary debug logging, in 9.4 branch only.

2018-04-17 Thread Tom Lane
Add more temporary debug logging, in 9.4 branch only. Last night's results were inconclusive, but after more staring at the code I've thought of some more data to gather. Discussion: https://postgr.es/m/[email protected] Branch -- REL9_4_STABLE Details --- https://git.postgr

pgsql: Improve coverage of nodeAppend runtime partition prune

2018-04-17 Thread Alvaro Herrera
Improve coverage of nodeAppend runtime partition prune coverage report indicated that mark_invalid_subplans_as_finished() and nearby code was not getting exercised by any tests. Add a new one which has execution-time Params rather than only external Params to fix this. In passing, David noticed

pgsql: Fix a few typos in comments and variable names.

2018-04-17 Thread Heikki Linnakangas
Fix a few typos in comments and variable names. Author: Michael Paquier Discussion: https://www.postgresql.org/message-id/20180411075223.GB19732%40paquier.xyz Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/55101549d538c9ed86e761dba0775025726d7310 Modified Files -

pgsql: Update Append's idea of first_partial_plan

2018-04-17 Thread Alvaro Herrera
Update Append's idea of first_partial_plan It turns out that after runtime partition pruning, Append's first_partial_plan does not accurately represent partial plans to run, if any of those got pruned. This could limit participation of workers in some partial subplans, if other subplans got prune

Re: pgsql: Support partition pruning at execution time

2018-04-17 Thread Alvaro Herrera
David Rowley wrote: > I've made another pass over the nodeAppend.c code and I'm unable to > see what might cause this, although I did discover a bug where > first_partial_plan is not set taking into account that some subplans > may have been pruned away during executor init. The only thing I think

pgsql: Fix confusion on the padding of GIDs in on commit and abort reco

2018-04-17 Thread Heikki Linnakangas
Fix confusion on the padding of GIDs in on commit and abort records. Review of commit 1eb6d652: It's pointless to add padding to the GID fields, when the code that follows assumes that there is no alignment, and uses memcpy(). Remove the pointless padding. Update comments to note the new fields i

Re: pgsql: Support partition pruning at execution time

2018-04-17 Thread David Rowley
On 18 April 2018 at 07:26, Alvaro Herrera wrote: > David Rowley wrote: > >> I've made another pass over the nodeAppend.c code and I'm unable to >> see what might cause this, although I did discover a bug where >> first_partial_plan is not set taking into account that some subplans >> may have been

pgsql: Simplify genbki.pl's data quoting rules.

2018-04-17 Thread Tom Lane
Simplify genbki.pl's data quoting rules. During the bootstrap data format conversion, it seemed important for verifiability's sake that the generated postgres.bki file stayed the same as before. That resulted in adding a bunch of ad-hoc rules about when to quote emitted data values, to match prev

pgsql: Rationalize handling of array type names in bootstrap data.

2018-04-17 Thread Tom Lane
Rationalize handling of array type names in bootstrap data. Formerly, Catalog.pm turned a C array type declaration in the catalog header files into a SQL type, e.g., 'foo[]'. Along the way, genbki.pl turned this into '_foo' for the purpose of type lookups, but wrote 'foo[]' to postgres.bki. Duri

pgsql: Rationalize handling of single and double quotes in bootstrap da

2018-04-17 Thread Tom Lane
Rationalize handling of single and double quotes in bootstrap data. Change things around so that proper quoting of values interpolated into the BKI data by initdb is the responsibility of initdb, not something we half-heartedly handle by putting double quotes into the raw BKI data. (Note: experime