pgsql: Minor copy-editing for 10.2 release notes.

2018-02-02 Thread Tom Lane
Minor copy-editing for 10.2 release notes. Second pass after taking a break ... Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/794eb3a8f00519fac561831dee35f4ee557bd08b Modified Files -- doc/src/sgml/release-10.sgml | 41

pgsql: doc: Fix index link

2018-02-02 Thread Peter Eisentraut
doc: Fix index link The index entry was pointing to a slightly wrong location. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/bc38bdba04d75f7c39d57f3eba9c01958d8d2f7c Modified Files -- doc/src/sgml/logicaldecoding.sgml | 2 +- 1 file changed, 1

Re: pgsql: Fix another instance of unsafe coding for shm_toc_lookup failure

2018-02-02 Thread Thomas Munro
On Sat, Feb 3, 2018 at 12:32 PM, Tom Lane wrote: > Fix another instance of unsafe coding for shm_toc_lookup failure. > > One or another author of commit 5bcf389ec seems to have thought that > computing an offset from a NULL pointer would yield another NULL pointer. > There may

pgsql: Be more wary about shm_toc_lookup failure.

2018-02-02 Thread Tom Lane
Be more wary about shm_toc_lookup failure. Commit 445dbd82a basically missed the point of commit d46633506, which was that we shouldn't allow shm_toc_lookup() failure to lead to a core dump or assertion crash, because the odds of such a failure should never be considered negligible. It's correct

pgsql: Be more wary about shm_toc_lookup failure.

2018-02-02 Thread Tom Lane
Be more wary about shm_toc_lookup failure. Commit 445dbd82a basically missed the point of commit d46633506, which was that we shouldn't allow shm_toc_lookup() failure to lead to a core dump or assertion crash, because the odds of such a failure should never be considered negligible. It's correct

pgsql: Fix another instance of unsafe coding for shm_toc_lookup failure

2018-02-02 Thread Tom Lane
Fix another instance of unsafe coding for shm_toc_lookup failure. One or another author of commit 5bcf389ec seems to have thought that computing an offset from a NULL pointer would yield another NULL pointer. There may possibly be architectures where that works, but common machines don't work

pgsql: First-draft release notes for 10.2.

2018-02-02 Thread Tom Lane
First-draft release notes for 10.2. As usual, the release notes for other branches will be made by cutting these down, but put them up for community review first. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/bf641d3376018c40860f26167a60febff5bc1f51 Modified

pgsql: Fix application of identity values in some cases

2018-02-02 Thread Peter Eisentraut
Fix application of identity values in some cases Investigation of 2d2d06b7e27e3177d5bef0061801c75946871db3 revealed that identity values were not applied in some further cases, including logical replication subscribers, VALUES RTEs, and ALTER TABLE ... ADD COLUMN. To fix all that, apply the

pgsql: Fix application of identity values in some cases

2018-02-02 Thread Peter Eisentraut
Fix application of identity values in some cases Investigation of 2d2d06b7e27e3177d5bef0061801c75946871db3 revealed that identity values were not applied in some further cases, including logical replication subscribers, VALUES RTEs, and ALTER TABLE ... ADD COLUMN. To fix all that, apply the

pgsql: Support parallel btree index builds.

2018-02-02 Thread Robert Haas
Support parallel btree index builds. To make this work, tuplesort.c and logtape.c must also support parallelism, so this patch adds that infrastructure and then applies it to the particular case of parallel btree index builds. Testing to date shows that this can often be 2-3x faster than a

Re: pgsql: Remove byte-masking macros for Datum conversion macros

2018-02-02 Thread Tom Lane
Peter Eisentraut writes: > Remove byte-masking macros for Datum conversion macros Looking at the code now, I think there's at least one bad outcome of this change: the behavior of CharGetDatum() is now ill-defined, because we'll (probably) get different results on signed-char

pgsql: Refactor code for partition bound searching

2018-02-02 Thread Robert Haas
Refactor code for partition bound searching Remove partition_bound_cmp() and partition_bound_bsearch(), whose void * argument could be, depending on the situation, of any of three different types: PartitionBoundSpec *, PartitionRangeBound *, Datum *. Instead, introduce separate bound-searching

pgsql: Add new function WaitForParallelWorkersToAttach.

2018-02-02 Thread Robert Haas
Add new function WaitForParallelWorkersToAttach. Once this function has been called, we know that all workers have started and attached to their error queues -- so if any of them subsequently exit uncleanly, we'll be sure to throw an ERROR promptly. Otherwise, users of the ParallelContext

pgsql: Improve ALTER TABLE synopsis

2018-02-02 Thread Stephen Frost
Improve ALTER TABLE synopsis Add into the ALTER TABLE synopsis the definition of partition_bound_spec, column_constraint, index_parameters and exclude_element. Initial patch by Lætitia Avrot, with further improvements by Amit Langote and Thomas Munro. Discussion: