Re: pgsql: Remove testing for precise LSN/reserved bytes in new TAP test

2020-04-09 Thread Kyotaro Horiguchi
At Thu, 09 Apr 2020 17:31:59 -0400, Tom Lane wrote in > Kyotaro Horiguchi writes: > >> Sorry for the wrong test file. > >> Checking in lower precision would be sufficient. > > > I noticed that prailiedog failed in another mode. > > Yeah. We have at least four different buildfarm members compl

pgsql: Fix collection of typos and grammar mistakes in the tree

2020-04-09 Thread Michael Paquier
Fix collection of typos and grammar mistakes in the tree This fixes some comments and documentation new as of Postgres 13. Author: Justin Pryzby Discussion: https://postgr.es/m/20200408165653.gf2...@telsasoft.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/dd0f

Re: pgsql: Remove testing for precise LSN/reserved bytes in new TAP test

2020-04-09 Thread Tom Lane
Kyotaro Horiguchi writes: >> Sorry for the wrong test file. >> Checking in lower precision would be sufficient. > I noticed that prailiedog failed in another mode. Yeah. We have at least four different buildfarm members complaining about this test case. I took this patch and further lobotomize

pgsql: Further stabilize results of 019_replslot_limit.pl.

2020-04-09 Thread Tom Lane
Further stabilize results of 019_replslot_limit.pl. Depending on specific values of restart_lsn or pg_current_wal_lsn() is obviously unsafe. The previous coding tried to dodge this issue by rounding off, but that's not good enough, as shown by multiple buildfarm members. Nuke all the uses of the

pgsql: Further cleanup of ts_headline code.

2020-04-09 Thread Tom Lane
Further cleanup of ts_headline code. Suppress a probably-meaningless uninitialized-variable warning (induced by my previous patch, I'm sorry to say). Improve mark_hl_fragments()'s test for overlapping cover strings: it failed to consider the possibility that the current string is strictly within

pgsql: Further cleanup of ts_headline code.

2020-04-09 Thread Tom Lane
Further cleanup of ts_headline code. Suppress a probably-meaningless uninitialized-variable warning (induced by my previous patch, I'm sorry to say). Improve mark_hl_fragments()'s test for overlapping cover strings: it failed to consider the possibility that the current string is strictly within

pgsql: Further cleanup of ts_headline code.

2020-04-09 Thread Tom Lane
Further cleanup of ts_headline code. Suppress a probably-meaningless uninitialized-variable warning (induced by my previous patch, I'm sorry to say). Improve mark_hl_fragments()'s test for overlapping cover strings: it failed to consider the possibility that the current string is strictly within

pgsql: Further cleanup of ts_headline code.

2020-04-09 Thread Tom Lane
Further cleanup of ts_headline code. Suppress a probably-meaningless uninitialized-variable warning (induced by my previous patch, I'm sorry to say). Improve mark_hl_fragments()'s test for overlapping cover strings: it failed to consider the possibility that the current string is strictly within

pgsql: Further cleanup of ts_headline code.

2020-04-09 Thread Tom Lane
Further cleanup of ts_headline code. Suppress a probably-meaningless uninitialized-variable warning (induced by my previous patch, I'm sorry to say). Improve mark_hl_fragments()'s test for overlapping cover strings: it failed to consider the possibility that the current string is strictly within

Re: pgsql: Fix default text search parser's ts_headline code for phrase que

2020-04-09 Thread Tom Lane
Erik Rijkers writes: > I get compiler warning/note from gcc 9.3.0 (on debian stretch): > wparser_def.c: In function ‘prsd_headline’: > wparser_def.c:2530:2: warning: ‘pose’ may be used uninitialized in this > function [-Wmaybe-uninitialized] > 2530 | mark_fragment(prs, highlightall, bestb, be

pgsql: Doc: improve documentation about ts_headline() function.

2020-04-09 Thread Tom Lane
Doc: improve documentation about ts_headline() function. Now that I've had my nose in that code, I thought the docs about it left something to be desired. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a4d4f59196ea8745fe4c048085d6d2bd66e8e7d8 Modified Files --

pgsql: Doc: improve documentation about ts_headline() function.

2020-04-09 Thread Tom Lane
Doc: improve documentation about ts_headline() function. Now that I've had my nose in that code, I thought the docs about it left something to be desired. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/fac00400846b742a0b8c804b3e075b385d5c3668 Modified Files

pgsql: Doc: improve documentation about ts_headline() function.

2020-04-09 Thread Tom Lane
Doc: improve documentation about ts_headline() function. Now that I've had my nose in that code, I thought the docs about it left something to be desired. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/7627f64ba21a2734192c6832d01a9c38948872bc Modified Files

pgsql: Doc: improve documentation about ts_headline() function.

2020-04-09 Thread Tom Lane
Doc: improve documentation about ts_headline() function. Now that I've had my nose in that code, I thought the docs about it left something to be desired. Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/12c2b7a37072d991aa15ca453f0cfcb3620d03f6 Modified Files

pgsql: Doc: improve documentation about ts_headline() function.

2020-04-09 Thread Tom Lane
Doc: improve documentation about ts_headline() function. Now that I've had my nose in that code, I thought the docs about it left something to be desired. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/2971180929b6d3902ea31b3274929955b05e2f5e Modified Files

Re: pgsql: Fix default text search parser's ts_headline code for phrase que

2020-04-09 Thread Erik Rijkers
On 2020-04-09 19:19, Tom Lane wrote: Fix default text search parser's ts_headline code for phrase queries. src/backend/tsearch/wparser_def.c | 173 +++--- src/test/regress/expected/tsearch.out | 43 ++--- src/test/regress/sql/tsearch.sql | 11 +++ 3 file

pgsql: Cosmetic improvements for default text search parser's ts_headli

2020-04-09 Thread Tom Lane
Cosmetic improvements for default text search parser's ts_headline code. This code was woefully unreadable and under-commented. Try to improve matters by adding comments, using some macros to make complicated if-tests more readable, using boolean type where appropriate, etc. There are a couple of

pgsql: Fix default text search parser's ts_headline code for phrase que

2020-04-09 Thread Tom Lane
Fix default text search parser's ts_headline code for phrase queries. This code could produce very poor results when asked to highlight a string based on a query using phrase-match operators. The root cause is that hlCover(), which is supposed to find a minimal substring that matches the query, w

pgsql: Fix default text search parser's ts_headline code for phrase que

2020-04-09 Thread Tom Lane
Fix default text search parser's ts_headline code for phrase queries. This code could produce very poor results when asked to highlight a string based on a query using phrase-match operators. The root cause is that hlCover(), which is supposed to find a minimal substring that matches the query, w

pgsql: Cosmetic improvements for default text search parser's ts_headli

2020-04-09 Thread Tom Lane
Cosmetic improvements for default text search parser's ts_headline code. This code was woefully unreadable and under-commented. Try to improve matters by adding comments, using some macros to make complicated if-tests more readable, using boolean type where appropriate, etc. There are a couple of

pgsql: Fix default text search parser's ts_headline code for phrase que

2020-04-09 Thread Tom Lane
Fix default text search parser's ts_headline code for phrase queries. This code could produce very poor results when asked to highlight a string based on a query using phrase-match operators. The root cause is that hlCover(), which is supposed to find a minimal substring that matches the query, w

pgsql: Cosmetic improvements for default text search parser's ts_headli

2020-04-09 Thread Tom Lane
Cosmetic improvements for default text search parser's ts_headline code. This code was woefully unreadable and under-commented. Try to improve matters by adding comments, using some macros to make complicated if-tests more readable, using boolean type where appropriate, etc. There are a couple of

pgsql: Cosmetic improvements for default text search parser's ts_headli

2020-04-09 Thread Tom Lane
Cosmetic improvements for default text search parser's ts_headline code. This code was woefully unreadable and under-commented. Try to improve matters by adding comments, using some macros to make complicated if-tests more readable, using boolean type where appropriate, etc. There are a couple of

pgsql: Cosmetic improvements for default text search parser's ts_headli

2020-04-09 Thread Tom Lane
Cosmetic improvements for default text search parser's ts_headline code. This code was woefully unreadable and under-commented. Try to improve matters by adding comments, using some macros to make complicated if-tests more readable, using boolean type where appropriate, etc. There are a couple of

pgsql: Fix default text search parser's ts_headline code for phrase que

2020-04-09 Thread Tom Lane
Fix default text search parser's ts_headline code for phrase queries. This code could produce very poor results when asked to highlight a string based on a query using phrase-match operators. The root cause is that hlCover(), which is supposed to find a minimal substring that matches the query, w

pgsql: Fix default text search parser's ts_headline code for phrase que

2020-04-09 Thread Tom Lane
Fix default text search parser's ts_headline code for phrase queries. This code could produce very poor results when asked to highlight a string based on a query using phrase-match operators. The root cause is that hlCover(), which is supposed to find a minimal substring that matches the query, w

pgsql: Fix CREATE TABLE LIKE INCLUDING GENERATED column order issue

2020-04-09 Thread Peter Eisentraut
Fix CREATE TABLE LIKE INCLUDING GENERATED column order issue CREATE TABLE LIKE INCLUDING GENERATED would fail if a generated column referred to a column with a higher attribute number. This is because the column mapping mechanism created the mapping incrementally as columns are added. This was s

pgsql: Fix CREATE TABLE LIKE INCLUDING GENERATED column order issue

2020-04-09 Thread Peter Eisentraut
Fix CREATE TABLE LIKE INCLUDING GENERATED column order issue CREATE TABLE LIKE INCLUDING GENERATED would fail if a generated column referred to a column with a higher attribute number. This is because the column mapping mechanism created the mapping incrementally as columns are added. This was s

pgsql: Add note in pg_stat_statements documentation about planning stat

2020-04-09 Thread Fujii Masao
Add note in pg_stat_statements documentation about planning statistics. The added note explains that the numbers of planning and execution in the statement are not always expected to match because their statistics are updated at their respective end phase, and only for successful operations. Auth

pgsql: Fix typo in pg_validatebackup documentation.

2020-04-09 Thread Fujii Masao
Fix typo in pg_validatebackup documentation. Author: Fujii Masao Reviewed-by: Robert Haas Discussion: https://postgr.es/m/78f76a3d-1a28-a97d-0394-5c96985dd...@oss.nttdata.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c4f82a779d2676bfca1694a6f9b5499e6cc5f60f

pgsql: Exclude backup_manifest file that existed in database, from BASE

2020-04-09 Thread Fujii Masao
Exclude backup_manifest file that existed in database, from BASE_BACKUP. If there is already a backup_manifest file in the database cluster, it belongs to the past backup that was used to start this server. It is not correct for the backup being taken now. So this commit changes pg_basebackup so t

Re: pgsql: Allow publishing partition changes via ancestors

2020-04-09 Thread Amit Langote
On Thu, Apr 9, 2020 at 9:42 PM Andrew Dunstan wrote: > On 4/8/20 5:23 AM, Peter Eisentraut wrote: > > Allow publishing partition changes via ancestors > > > > To control whether partition changes are replicated using their own > > identity and schema or an ancestor's, add a new parameter that can

Re: pgsql: Allow publishing partition changes via ancestors

2020-04-09 Thread Andrew Dunstan
On 4/8/20 5:23 AM, Peter Eisentraut wrote: > Allow publishing partition changes via ancestors > > To control whether partition changes are replicated using their own > identity and schema or an ancestor's, add a new parameter that can be > set per publication named 'publish_via_partition_root'. >