pgsql: Allow the planner-related functions and hook to accept the query

2020-03-29 Thread Fujii Masao
Allow the planner-related functions and hook to accept the query string. This commit adds query_string argument into the planner-related functions and hook and allows us to pass the query string to them. Currently there is no user of the query string passed. But the upcoming patch for the plannin

Re: pgsql: Allow vacuum command to process indexes in parallel.

2020-03-29 Thread Amit Kapila
On Mon, Mar 30, 2020 at 4:18 AM Andres Freund wrote: > > > 2076 > > 2077 if ((shared_balance >= VacuumCostLimit) && > > >>> CID ...: Incorrect expression (UNINTENDED_INTEGER_DIVISION) > > >>> Dividing integer expressions "VacuumCostLimit" and "nworkers", and > > >>> then conver

pgsql: Expose BufferUsageAccumDiff().

2020-03-29 Thread Fujii Masao
Expose BufferUsageAccumDiff(). Previously pg_stat_statements calculated the difference of buffer counters by its own code even while BufferUsageAccumDiff() had the same code. This commit expose BufferUsageAccumDiff() and makes pg_stat_statements use it for the calculation, in order to simply the c

Re: pgsql: Allow vacuum command to process indexes in parallel.

2020-03-29 Thread Mahendra Singh Thalor
On Mon, 30 Mar 2020 at 07:39, Amit Kapila wrote: > > On Mon, Mar 30, 2020 at 4:18 AM Andres Freund wrote: > > > > Hi, > > > > On 2020-01-20 02:33:34 +, Amit Kapila wrote: > > > Allow vacuum command to process indexes in parallel. > > > > > > This feature allows the vacuum to leverage multiple

pgsql: Introduce vacuum errcontext to display additional information.

2020-03-29 Thread Amit Kapila
Introduce vacuum errcontext to display additional information. The additional information displayed will be block number for error occurring while processing heap and index name for error occurring while processing the index. This will help us in diagnosing the problems that occur during a vacuum

Re: pgsql: Allow vacuum command to process indexes in parallel.

2020-03-29 Thread Amit Kapila
On Mon, Mar 30, 2020 at 4:18 AM Andres Freund wrote: > > Hi, > > On 2020-01-20 02:33:34 +, Amit Kapila wrote: > > Allow vacuum command to process indexes in parallel. > > > > This feature allows the vacuum to leverage multiple CPUs in order to > > process indexes. This enables us to perform i

pgsql: Cosmetic improvements in ltree code.

2020-03-29 Thread Tom Lane
Cosmetic improvements in ltree code. Add more comments in ltree.h, and correct a misstatement or two. Use a symbol, rather than hardwired constants, for the maximum length of an ltree label. The max length is still hardwired in the associated error messages, but I want to clean that up as part o

pgsql: Doc: correct misstatement about ltree label maximum length.

2020-03-29 Thread Tom Lane
Doc: correct misstatement about ltree label maximum length. The documentation says that the max length is 255 bytes, but code inspection says it's actually 255 characters; and relevant lengths are stored as uint16 so that that works. Branch -- REL_11_STABLE Details --- https://git.postgr

pgsql: Doc: correct misstatement about ltree label maximum length.

2020-03-29 Thread Tom Lane
Doc: correct misstatement about ltree label maximum length. The documentation says that the max length is 255 bytes, but code inspection says it's actually 255 characters; and relevant lengths are stored as uint16 so that that works. Branch -- REL9_5_STABLE Details --- https://git.postgr

pgsql: Doc: correct misstatement about ltree label maximum length.

2020-03-29 Thread Tom Lane
Doc: correct misstatement about ltree label maximum length. The documentation says that the max length is 255 bytes, but code inspection says it's actually 255 characters; and relevant lengths are stored as uint16 so that that works. Branch -- REL_10_STABLE Details --- https://git.postgr

pgsql: Doc: correct misstatement about ltree label maximum length.

2020-03-29 Thread Tom Lane
Doc: correct misstatement about ltree label maximum length. The documentation says that the max length is 255 bytes, but code inspection says it's actually 255 characters; and relevant lengths are stored as uint16 so that that works. Branch -- REL9_6_STABLE Details --- https://git.postgr

pgsql: Doc: correct misstatement about ltree label maximum length.

2020-03-29 Thread Tom Lane
Doc: correct misstatement about ltree label maximum length. The documentation says that the max length is 255 bytes, but code inspection says it's actually 255 characters; and relevant lengths are stored as uint16 so that that works. Branch -- master Details --- https://git.postgresql.or

pgsql: Doc: correct misstatement about ltree label maximum length.

2020-03-29 Thread Tom Lane
Doc: correct misstatement about ltree label maximum length. The documentation says that the max length is 255 bytes, but code inspection says it's actually 255 characters; and relevant lengths are stored as uint16 so that that works. Branch -- REL_12_STABLE Details --- https://git.postgr

Re: pgsql: Allow vacuum command to process indexes in parallel.

2020-03-29 Thread Andres Freund
Hi, On 2020-01-20 02:33:34 +, Amit Kapila wrote: > Allow vacuum command to process indexes in parallel. > > This feature allows the vacuum to leverage multiple CPUs in order to > process indexes. This enables us to perform index vacuuming and index > cleanup with background workers. This ad

Re: pgsql: Add deduplication to nbtree.

2020-03-29 Thread Andres Freund
Hi, On 2020-03-29 15:19:50 -0700, Peter Geoghegan wrote: > On Sun, Mar 29, 2020 at 3:15 PM Andres Freund wrote: > > Is it perhaps possible to silence the warnign with somethign along the > > lines of > > Assert(nhtids + vacposting->ndeletedtids == > > BTreeTupleGetNPosting(origtuple)) > > I don'

Re: pgsql: Add deduplication to nbtree.

2020-03-29 Thread Peter Geoghegan
On Sun, Mar 29, 2020 at 3:15 PM Andres Freund wrote: > Is it perhaps possible to silence the warnign with somethign along the > lines of > Assert(nhtids + vacposting->ndeletedtids == BTreeTupleGetNPosting(origtuple)) > I don't know this code, but it looks like that'd have to be true? > Perhaps tha

Re: pgsql: Add deduplication to nbtree.

2020-03-29 Thread Andres Freund
Hi, On 2020-03-01 16:09:37 -0800, Peter Geoghegan wrote: > On Sun, Mar 1, 2020 at 3:01 PM Peter Geoghegan wrote: > > I am happy to add parallel-to-_bt_form_posting() assertions about > > alignment to _bt_form_posting(), to nail it down completely. Plus I'll > > add the assertion I suggested alrea

pgsql: Document color support

2020-03-29 Thread Peter Eisentraut
Document color support Add a documentation appendix that explains the PG_COLOR and PG_COLORS environment variables. Discussion: https://www.postgresql.org/message-id/flat/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/com

pgsql: pg_regress: Observe TMPDIR

2020-03-29 Thread Peter Eisentraut
pg_regress: Observe TMPDIR Put the temporary socket directory under TMPDIR, if that environment variable is set, instead of the hardcoded /tmp. This allows running the tests if there is no /tmp at all (for example on Windows, although running the tests with Unix-domain sockets is not enabled on W

pgsql: Update SQL features

2020-03-29 Thread Peter Eisentraut
Update SQL features Change F181 to supported. It requires that an embedded C program can be split across multiple files, which ECPG easily supports. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b79911dc8c0dc3b864999b9a17333716d602c6a0 Modified Files ---