pgsql: Fix ancient thinko in mergejoin cost estimation.

2018-12-18 Thread Tom Lane
Fix ancient thinko in mergejoin cost estimation. "rescanratio" was computed as 1 + rescanned-tuples / total-inner-tuples, which is sensible if it's to be multiplied by total-inner-tuples or a cost value corresponding to scanning all the inner tuples. But in reality it was (mostly) multiplied by i

pgsql: Fix ancient thinko in mergejoin cost estimation.

2018-12-18 Thread Tom Lane
Fix ancient thinko in mergejoin cost estimation. "rescanratio" was computed as 1 + rescanned-tuples / total-inner-tuples, which is sensible if it's to be multiplied by total-inner-tuples or a cost value corresponding to scanning all the inner tuples. But in reality it was (mostly) multiplied by i

pgsql: Fix ancient thinko in mergejoin cost estimation.

2018-12-18 Thread Tom Lane
Fix ancient thinko in mergejoin cost estimation. "rescanratio" was computed as 1 + rescanned-tuples / total-inner-tuples, which is sensible if it's to be multiplied by total-inner-tuples or a cost value corresponding to scanning all the inner tuples. But in reality it was (mostly) multiplied by i

pgsql: Fix ancient thinko in mergejoin cost estimation.

2018-12-18 Thread Tom Lane
Fix ancient thinko in mergejoin cost estimation. "rescanratio" was computed as 1 + rescanned-tuples / total-inner-tuples, which is sensible if it's to be multiplied by total-inner-tuples or a cost value corresponding to scanning all the inner tuples. But in reality it was (mostly) multiplied by i

pgsql: Fix ancient thinko in mergejoin cost estimation.

2018-12-18 Thread Tom Lane
Fix ancient thinko in mergejoin cost estimation. "rescanratio" was computed as 1 + rescanned-tuples / total-inner-tuples, which is sensible if it's to be multiplied by total-inner-tuples or a cost value corresponding to scanning all the inner tuples. But in reality it was (mostly) multiplied by i

pgsql: Fix ancient thinko in mergejoin cost estimation.

2018-12-18 Thread Tom Lane
Fix ancient thinko in mergejoin cost estimation. "rescanratio" was computed as 1 + rescanned-tuples / total-inner-tuples, which is sensible if it's to be multiplied by total-inner-tuples or a cost value corresponding to scanning all the inner tuples. But in reality it was (mostly) multiplied by i

pgsql: Update sepgsql regression test results for commit ca4103025.

2018-12-18 Thread Tom Lane
Update sepgsql regression test results for commit ca4103025. Per buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b2d9e17768864030fb0829b55303b8b72bfd809f Modified Files -- contrib/sepgsql/expected/alter.out | 1 + 1 file changed, 1 insertion(+

pgsql: Make collation-aware system catalog columns use "C" collation.

2018-12-18 Thread Tom Lane
Make collation-aware system catalog columns use "C" collation. Up to now we allowed text columns in system catalogs to use collation "default", but that isn't really safe because it might mean something different in template0 than it means in a database cloned from template0. In particular, this c

pgsql: Doc: fix typo in "Generic File Access Functions" section.

2018-12-18 Thread Tatsuo Ishii
Doc: fix typo in "Generic File Access Functions" section. Issue reported by me and fix by Tom Lane. Discussion: https://postgr.es/m/20181219.080458.1434575730369741406.t-ishii%40sraoss.co.jp Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3cab54878dbf212c08699bb974

pgsql: Doc: fix typo in "Generic File Access Functions" section.

2018-12-18 Thread Tatsuo Ishii
Doc: fix typo in "Generic File Access Functions" section. Issue reported by me and fix by Tom Lane. Discussion: https://postgr.es/m/20181219.080458.1434575730369741406.t-ishii%40sraoss.co.jp Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/84fcc2ce56962a82e4d

pgsql: Correct obsolete nbtree recovery comments.

2018-12-18 Thread Peter Geoghegan
Correct obsolete nbtree recovery comments. Commit 40dae7ec537, which made the handling of interrupted nbtree page splits more robust, removed an nbtree-specific end-of-recovery cleanup step. This meant that it was no longer possible to complete an interrupted page split during recovery. However,

pgsql: Correct obsolete nbtree recovery comments.

2018-12-18 Thread Peter Geoghegan
Correct obsolete nbtree recovery comments. Commit 40dae7ec537, which made the handling of interrupted nbtree page splits more robust, removed an nbtree-specific end-of-recovery cleanup step. This meant that it was no longer possible to complete an interrupted page split during recovery. However,

pgsql: Remove obsolete nbtree duplicate entries comment.

2018-12-18 Thread Peter Geoghegan
Remove obsolete nbtree duplicate entries comment. Remove a comment from the Berkeley days claiming that nbtree must disambiguate duplicate keys within _bt_moveright(). There is no special care taken around duplicates within _bt_moveright(), at least since commit 9e85183bfc3 removed inscrutable _b