Re: propagating replica identity to partitions

2019-03-14 Thread Peter Eisentraut
On 2019-02-28 23:41, Alvaro Herrera wrote: > Maybe ADD GENERATED AS IDENTITY / DROP IDENTITY should recurse; not > really sure about this one. Peter? No, the intention is that only the partition root has the identity property. If you wanted to make it recurse, then you'd need to arrange it so th

Re: [HACKERS] PATCH: multivariate histograms and MCV lists

2019-03-14 Thread Tomas Vondra
On 3/14/19 12:56 PM, Kyotaro HORIGUCHI wrote: > At Wed, 13 Mar 2019 19:37:45 +1300, David Rowley > wrote in > >> On Wed, 13 Mar 2019 at 17:20, Kyotaro HORIGUCHI >> wrote: >>> bms_member_index seems working differently than maybe expected. >>> >>> bms_member_index((2, 4), 0) => 0, (I think)

RE: Timeout parameters

2019-03-14 Thread Tsunakawa, Takayuki
From: Robert Haas [mailto:robertmh...@gmail.com] > One other thing -- I looked a bit into the pgsql-jdbc implementation > of a similarly-named option, and it does seem to match what you are > proposing here. I wonder what user experiences with that option have > been like. One case I faintly reca

RE: speeding up planning with partitions

2019-03-14 Thread Imai, Yoshikazu
Amit-san, On Thu, Mar 14, 2019 at 9:04 AM, Amit Langote wrote: > > 0002: > > * I don't really know that delaying adding resjunk output columns to > the plan doesn't affect any process in the planner. From the comments > of PlanRowMark, those columns are used in only the executor so I think > delay

Re: Offline enabling/disabling of data checksums

2019-03-14 Thread Michael Paquier
On Thu, Mar 14, 2019 at 03:23:59PM +0100, Magnus Hagander wrote: > Are you suggesting we should support running with a master with checksums > on and a standby with checksums off in the same cluster? That seems.. Very > fragile. Well, saying that it is supported is a too big term for that. What I

Re: Index Skip Scan

2019-03-14 Thread Kyotaro HORIGUCHI
At Thu, 14 Mar 2019 14:32:49 +0100, Dmitry Dolgov <9erthali...@gmail.com> wrote in > > On Tue, Mar 5, 2019 at 4:05 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > > Although there are still some rough edges, e.g. going forth, back and forth > > again leads to a sutiation, when `_bt_first` i

RE: speeding up planning with partitions

2019-03-14 Thread Imai, Yoshikazu
Hi, David On Thu, Mar 14, 2019 at 9:04 AM, David Rowley wrote: > On Thu, 14 Mar 2019 at 21:35, Imai, Yoshikazu > wrote: > > 0007: > > * This changes some processes using "for loop" to using > "while(bms_next_member())" which speeds up processing when we scan few > partitions in one statement, but

RE: Timeout parameters

2019-03-14 Thread Tsunakawa, Takayuki
From: Robert Haas [mailto:robertmh...@gmail.com] > Now you might say - what if the server is stopped not because of > SIGSTOP but because of some other reason, like it's waiting for a > lock? Well, in that case, the database server is still functioning, > and you will not want the connection to be

RE: Timeout parameters

2019-03-14 Thread Tsunakawa, Takayuki
From: mikalaike...@ibagroup.eu [mailto:mikalaike...@ibagroup.eu] > Do you mind me asking you whether you have thought that solving your problem > can lead to the problem in the other user applications? > Let's imagine a possible problem: > 1. end-user sets 'socket_timeout' only for current session

Re: Offline enabling/disabling of data checksums

2019-03-14 Thread Michael Paquier
On Thu, Mar 14, 2019 at 04:26:20PM +0100, Michael Banck wrote: > Am Donnerstag, den 14.03.2019, 15:26 +0100 schrieb Magnus Hagander: >> One big-hammer method could be similar to what pg_upgrade does -- >> temporarily rename away the controlfile so postgresql can't start, and >> when done, put it ba

Re: Offline enabling/disabling of data checksums

2019-03-14 Thread Michael Paquier
On Fri, Mar 15, 2019 at 11:50:27AM +0900, Michael Paquier wrote: > - Rename the control file when beginning the enabling operation, with > a callback to rename the file back if the operation is interrupted. > > Does this make sense? Just before I forget... Please note that this handles interrupt

Willing to fix a TODO case in libpq module

2019-03-14 Thread Wu, Fei
Hi,all On website: https://wiki.postgresql.org/wiki/Todo#libpq I found that in libpq module,there is a todo case: --- Prevent PQfnumber() from lowercasing unquoted column names PQfnumber() should never have been doing lowe

Re: Index Skip Scan

2019-03-14 Thread Kyotaro HORIGUCHI
Hello. At Thu, 14 Mar 2019 14:32:49 +0100, Dmitry Dolgov <9erthali...@gmail.com> wrote in > > On Tue, Mar 5, 2019 at 4:05 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > > Although there are still some rough edges, e.g. going forth, back and forth > > again leads to a sutiation, when `_bt_

Re: libpq environment variables in the server

2019-03-14 Thread Noah Misch
Looks good. On Thu, Mar 14, 2019 at 12:06:45PM +0100, Peter Eisentraut wrote: > + # Temporarily unset PGAPPNAME so that the server doesn't inherit > + # it. Otherwise this could affect libpqwalreceiver connections in > + # confusing ways. > + my $save_pgappname = $ENV{PGAPPNAME};

string_to_array, array_to_string function without separator

2019-03-14 Thread Pavel Stehule
Hi I propose mentioned functions without specified separator. In this case the string is transformed to array of chars, in second case, the array of chars is transformed back to string. Comments, notes? Regards Pavel

Fix typo in test code comments

2019-03-14 Thread Kato, Sho
Hi, I think ts_vector is a typo for tsvector. regards, Sho Kato fix-typo-for-tsvector.patch Description: fix-typo-for-tsvector.patch

Re: [HACKERS] SERIALIZABLE with parallel query

2019-03-14 Thread Thomas Munro
On Mon, Mar 4, 2019 at 10:17 AM Thomas Munro wrote: > On Thu, Oct 11, 2018 at 10:15 AM Kevin Grittner wrote: > > It applies and builds clean, it passed make world with cassert and TAP > > tests, and I can't see any remaining flaws. This is true both of just > > the 0001 v16 patch and that with 0

Re: Introduce timeout capability for ConditionVariableSleep

2019-03-14 Thread Kyotaro HORIGUCHI
Hello. At Thu, 14 Mar 2019 17:26:11 -0700, Shawn Debnath wrote in <20190315002611.ga1...@f01898859afd.ant.amazon.com> > Thank you reviewing. Comments inline. > > On Wed, Mar 13, 2019 at 05:24:15PM +0900, Kyotaro HORIGUCHI wrote: > > > Agree. In my testing WaitEventSetWait did the work for calcu

What is a savepointLevel ?

2019-03-14 Thread Chapman Flack
Hello hackers, What exactly is a savepointLevel? They seem to have been there for 15 years[1], diligently copied from parent transactions to children, fastidiously checked to avoid crossing a level on rollback or release, but does anything ever change the level from its initial value? I'm drawing

Facing issue in using special characters

2019-03-14 Thread M Tarkeshwar Rao
Hi all, Facing issue in using special characters. We are trying to insert records to a remote Postgres Server and our application not able to perform this because of errors. It seems that issue is because of the special characters that has been used in one of the field of a row. Regards Tarkes

Re: Fix typo in test code comments

2019-03-14 Thread Kyotaro HORIGUCHI
Hello. At Fri, 15 Mar 2019 04:37:03 +, "Kato, Sho" wrote in <25C1C6B2E7BE044889E4FE8643A58BA963E1D03D@G01JPEXMBKW03> > Hi, > > I think ts_vector is a typo for tsvector. > --- ts_vector corner cases > +-- tsvector corner cases > select to_tsvector('""'::json); Yeah, surely it is typo, but

RE: Is PREPARE of ecpglib thread safe?

2019-03-14 Thread Matsumura, Ryo
Hi Horiguchi-san, Kuroda-san Horiguchi-san, thank you for your comment. I have a question. A bug of StatementCache is occurred in previous versions. Should a patch be separated? > Horiguchi-san wrote: > It seems like a local cache of server-side data, which is similar > to catcache on server sid

RE: speeding up planning with partitions

2019-03-14 Thread Imai, Yoshikazu
Amit-san, I have another little comments about v31-patches. * We don't need is_first_child in inheritance_planner(). On Fri, Mar 8, 2019 at 9:18 AM, Amit Langote wrote: > On 2019/03/08 16:16, Imai, Yoshikazu wrote: > > I attached the diff of modification for v26-0003 patch which also > contains

Re: Tid scan improvements

2019-03-14 Thread Edmund Horner
On Thu, 14 Mar 2019 at 23:37, Edmund Horner wrote: > On Thu, 14 Mar 2019 at 23:06, David Rowley > wrote: > > Just looking again, I think the block of code starting: > > > > + if (density > 0.0) > > > > needs a comment to mention what it's doing. Perhaps: > > > > + /* > > + * Using the average tu

Re: Fix typo in test code comments

2019-03-14 Thread Michael Paquier
On Fri, Mar 15, 2019 at 02:24:29PM +0900, Kyotaro HORIGUCHI wrote: > Yeah, surely it is typo, but not for tsvector but > to_tsvector. See the block just below. Yes, I agree with Horiguchi-san here that this refers to the function call, and not the data type. Everybody agrees? -- Michael signatu

RE: Fix typo in test code comments

2019-03-14 Thread Kato, Sho
At Friday, March 15, 2019 2:24 PM, Kyotaro HORIGUCHI wrote > Yeah, surely it is typo, but not for tsvector but to_tsvector. See the > block just below. > > > -- json_to_tsvector corner cases > > select json_to_tsvector('""'::json, '"all"'); Oops, thank you for your advice. I fixed it. Regards,

RE: Problem with default partition pruning

2019-03-14 Thread Yuzuko Hosoya
Hi Thibaut, Thanks a lot for your test and comments. > > Le 28/02/2019 à 09:26, Imai, Yoshikazu a écrit : > > Hosoya-san > > > > On Wed, Feb 27, 2019 at 6:51 AM, Yuzuko Hosoya wrote: > >>> From: Amit Langote [mailto:langote_amit...@lab.ntt.co.jp] > >>> Sent: Wednesday, February 27, 2019 11:22 AM

RE: proposal: pg_restore --convert-to-text

2019-03-14 Thread Imai, Yoshikazu
Hi Jose, Sorry for my late reply. On Wed, Mar 6, 2019 at 10:58 AM, José Arthur Benetasso Villanova wrote: > On Thu, 28 Feb 2019, Imai, Yoshikazu wrote: > > > Is there no need to rewrite the Description in the Doc to state we should > specify either -d or -f option? > > (and also it might be bett

Re: Sparse bit set data structure

2019-03-14 Thread Julien Rouhaud
On Thu, Mar 14, 2019 at 4:37 PM Julien Rouhaud wrote: > > + if (newitem <= sbs->last_item) > + elog(ERROR, "cannot insert to sparse bitset out of order"); > > Is there any reason to disallow inserting duplicates? AFAICT nothing > prevents that in the current code. If that's inten

Re: Is PREPARE of ecpglib thread safe?

2019-03-14 Thread Kyotaro HORIGUCHI
At Fri, 15 Mar 2019 05:27:01 +, "Matsumura, Ryo" wrote in <03040DFF97E6E54E88D3BFEE5F5480F737AC3F24@G01JPEXMBYT04> > Hi Horiguchi-san, Kuroda-san > > Horiguchi-san, thank you for your comment. > > I have a question. > A bug of StatementCache is occurred in previous versions. > Should a pat

Re: Is PREPARE of ecpglib thread safe?

2019-03-14 Thread Kyotaro HORIGUCHI
Oops. At Fri, 15 Mar 2019 15:33:50 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20190315.153350.226491548.horiguchi.kyot...@lab.ntt.co.jp> > > // If ecpglib didn't reject the above, ecpglib cannot judge > > // which connection the followings should be executed on. > > exec sql

<    1   2