Re: [HACKERS] [Bug fix]If recovery.conf has target_session_attrs=read-write, the standby fails to start.

2017-05-19 Thread Higuchi, Daisuke
From: Michael Paquier [mailto:michael.paqu...@gmail.com] > if (!PQsendQuery(conn, >- "show transaction_read_only")) >+ "SHOW transaction_read_only")) >Or perhaps the replication command parser could be made

[HACKERS] Redundant check of em_is_child

2017-05-19 Thread Amit Langote
In match_eclasses_to_foreign_key_col(), there is this: if (em->em_is_child) continue; /* ignore children here */ ISTM, it might as well be: Assert(!em->em_is_child);/* no children yet */ That's because, I think it's still too early in query_plan

[HACKERS] PostgreSQL 10beta1 - compilation fails on OpenBSD -current

2017-05-19 Thread Pierre-Emmanuel André
Hi, I tried to build PostgreSQL 10beta1 on OpenBSD -current and i have this error: gmake[3]: Entering directory '/usr/ports/pobj/postgresql-10beta1/postgresql-10beta1/src/backend/libpq' cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-a

Re: [HACKERS] PostgreSQL 10beta1 - compilation fails on OpenBSD -current

2017-05-19 Thread Heikki Linnakangas
On 05/19/2017 12:03 PM, Pierre-Emmanuel André wrote: Hi, I tried to build PostgreSQL 10beta1 on OpenBSD -current and i have this error: gmake[3]: Entering directory '/usr/ports/pobj/postgresql-10beta1/postgresql-10beta1/src/backend/libpq' cc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclara

Re: [HACKERS] [POC] hash partitioning

2017-05-19 Thread amul sul
On Wed, May 17, 2017 at 6:54 PM, Ashutosh Bapat wrote: [...] > > Comments on the tests > +#ifdef USE_ASSERT_CHECKING > +{ > +/* > + * Hash partition bound stores modulus and remainder at > + * b1->datums[i][0] and b1->datums[i][1] position respectively.

Re: [HACKERS] Pulling up more complicated subqueries

2017-05-19 Thread Ashutosh Bapat
On Wed, May 17, 2017 at 8:38 PM, Heikki Linnakangas wrote: > > As a final note, I found an interesting paper called "Unnesting Arbitrary > Queries", by Thomas Neumann and Alfons Kemper > (http://www.btw-2015.de/res/proceedings/Hauptband/Wiss/Neumann-Unnesting_Arbitrary_Querie.pdf). > It describes

Re: [HACKERS] Re: [BUGS] BUG #14657: Server process segmentation fault in v10, May 10th dev snapshot

2017-05-19 Thread Ashutosh Bapat
On Thu, May 18, 2017 at 7:23 AM, Amit Langote wrote: > On 2017/05/18 10:49, Amit Langote wrote: >> On 2017/05/18 2:14, Dilip Kumar wrote: >>> On Wed, May 17, 2017 at 7:41 PM, wrote: (gdb) bt #0 0x0061ab1b in list_nth () #1 0x005e4081 in ExecLockNonLeafAppendTable

[HACKERS] HINT message for "ALTER SUBSCRIPTION.. WITH" need to change with SET keyword

2017-05-19 Thread tushar
Hi, There is small issue in the HINT message which we provide at the time of dropping subscription ,where we are saying -WITH (slot_name) which need to change with SET (slot_name). postgres=# drop subscription sub; ERROR: could not connect to publisher when attempting to drop the replicatio

Re: [HACKERS] HINT message for "ALTER SUBSCRIPTION.. WITH" need to change with SET keyword

2017-05-19 Thread Dilip Kumar
On Fri, May 19, 2017 at 3:41 PM, tushar wrote: > postgres=# drop subscription sub; > ERROR: could not connect to publisher when attempting to drop the > replication slot "pub" > DETAIL: The error was: could not connect to server: No such file or > directory > Is the server running locally an

Re: [HACKERS] PostgreSQL 10beta1 - compilation fails on OpenBSD -current

2017-05-19 Thread Pierre-Emmanuel André
On Fri, May 19, 2017 at 12:21:26PM +0300, Heikki Linnakangas wrote: > On 05/19/2017 12:03 PM, Pierre-Emmanuel André wrote: > > Hi, > > > > I tried to build PostgreSQL 10beta1 on OpenBSD -current and i have this > > error: > > > > gmake[3]: Entering directory > > '/usr/ports/pobj/postgresql-10be

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Stephen Frost
Tom, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > All in all, this looks pretty darn good from here, and I'm thinking > we should push forward on it. +1. Thanks! Stephen signature.asc Description: Digital signature

[HACKERS] Allowing dash character in LTREE

2017-05-19 Thread Cyril Auburtin
I propose to allow the `-` char in allowed label characters The reason is to allow to use more easily base64 ids, (like https://github.com/dylang/shortid, ...), uuid's too in labels `-` is also not used as a query operator as a plus source: https://doxygen.postgresql.org/ltree_8h.html#a1cb5d5d

Re: [HACKERS] PostgreSQL 10beta1 - compilation fails on OpenBSD -current

2017-05-19 Thread Pierre-Emmanuel André
On Fri, May 19, 2017 at 12:44:27PM +0200, Pierre-Emmanuel André wrote: > On Fri, May 19, 2017 at 12:21:26PM +0300, Heikki Linnakangas wrote: > > On 05/19/2017 12:03 PM, Pierre-Emmanuel André wrote: > > > Hi, > > > > > > I tried to build PostgreSQL 10beta1 on OpenBSD -current and i have this > > >

Re: [HACKERS] PostgreSQL 10beta1 - compilation fails on OpenBSD -current

2017-05-19 Thread Mikael Kjellström
On Fri, May 19, 2017 at 11:21 AM, Heikki Linnakangas wrote: > On 05/19/2017 12:03 PM, Pierre-Emmanuel André wrote: > > Mikael, could you add --with-bsd-auth to curculio's configuration, please? > On 9.6 and above. > > - Heikki > > Hi Heikki, I've added -with-bsd-auth to 9.6 and HEAD now. Let

[HACKERS] [POC] Faster processing at Gather node

2017-05-19 Thread Rafia Sabih
Hello everybody, While analysing the performance of TPC-H queries for the newly developed parallel-operators, viz, parallel index, bitmap heap scan, etc. we noticed that the time taken by gather node is significant. On investigation, as per the current method it copies each tuple to the shared que

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-19 Thread Tels
On Thu, May 18, 2017 10:24 pm, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Michael >> Paquier >> On Thu, May 18, 2017 at 11:30 PM, Robert Haas >> wrote: >> > Because why? >> >> Because it is critical to let the

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Robert Haas
On Thu, May 18, 2017 at 11:00 PM, Tom Lane wrote: > * Improvements in formatting around sizeof and related constructs, > for example: > > * Likewise, operators after casts work better than before: > > * Sane formatting of function typedefs, for example: > > * Non-typedef struct pointers are now fo

Re: [HACKERS] [POC] Faster processing at Gather node

2017-05-19 Thread Robert Haas
On Fri, May 19, 2017 at 7:55 AM, Rafia Sabih wrote: > While analysing the performance of TPC-H queries for the newly developed > parallel-operators, viz, parallel index, bitmap heap scan, etc. we noticed > that the time taken by gather node is significant. On investigation, as per > the current me

Re: [HACKERS] [BUGS] Concurrent ALTER SEQUENCE RESTART Regression

2017-05-19 Thread Robert Haas
On Thu, May 18, 2017 at 4:54 PM, Andres Freund wrote: > There's still weird behaviour, unfortunately. If you do an ALTER > SEQUENCE changing minval/maxval w/ restart in a transaction, and abort, > you'll a) quite possibly not be able to use the sequence anymore, > because it may of bounds b) DDL

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-05-19 Thread Petr Jelinek
On 18/05/17 16:16, Robert Haas wrote: > On Wed, May 17, 2017 at 6:58 AM, Masahiko Sawada > wrote: >> I think the above changes can solve this issue but It seems to me that >> holding AccessExclusiveLock on pg_subscription by DROP SUBSCRIPTION >> until commit could lead another deadlock problem in

Re: [HACKERS] Hash Functions

2017-05-19 Thread Robert Haas
On Fri, May 19, 2017 at 2:36 AM, Jeff Davis wrote: > I could agree to something like that. Let's explore some of the challenges > there and potential solutions: > > 1. Dump/reload of hash partitioned data. > > Falling back to restore-through-the-root seems like a reasonable answer > here. Moving t

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-05-19 Thread Robert Haas
On Thu, May 18, 2017 at 4:38 AM, Ashutosh Bapat wrote: > But in case a user has written an = operator which returns true for > two NULL values, per description in [1], that comparison operator is > flawed and > using that operator is going to result in SQL-standard-incompliant > behaviour. I have

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Tom Lane
Robert Haas writes: > On Thu, May 18, 2017 at 11:00 PM, Tom Lane wrote: >> The reason PGSSTrackLevel is "unrecognized" is that it's not in >> typedefs.list, which is a deficiency in our typedef-collection >> technology not in indent. (I believe the problem is that there >> are no variables decla

Re: [HACKERS] PostgreSQL 10beta1 - compilation fails on OpenBSD -current

2017-05-19 Thread Pierre-Emmanuel André
On Fri, May 19, 2017 at 01:32:37PM +0200, Pierre-Emmanuel André wrote: > On Fri, May 19, 2017 at 12:44:27PM +0200, Pierre-Emmanuel André wrote: > > On Fri, May 19, 2017 at 12:21:26PM +0300, Heikki Linnakangas wrote: > > > On 05/19/2017 12:03 PM, Pierre-Emmanuel André wrote: > > > > Hi, > > > > > >

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Stephen Frost
Tom, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > On Thu, May 18, 2017 at 11:00 PM, Tom Lane wrote: > >> The reason PGSSTrackLevel is "unrecognized" is that it's not in > >> typedefs.list, which is a deficiency in our typedef-collection > >> technology not in indent. (I

[HACKERS] Incorrect mention of pg_xlog_switch() in xlogfuncs.c

2017-05-19 Thread Neha Khatri
While reading some code, noticed that the headers of functions pg_walfile_name_offset() and pg_walfile_name() incorrecty refer pg_xlog_switch() since the inception of code in commit 704ddaaa. In PG10 implementation, actual name of the referred function is pg_switch_wal(). So either refer the corre

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> Yes, moving the goalposts on ease-of-use is an important consideration >> here. What that says to me is that we ought to pull FreeBSD indent >> into our tree, and provide Makefile support that makes it easy for >> any developer to

[HACKERS] PG10 Crash-safe and replicable Hash Indexes and UNIQUE

2017-05-19 Thread Chapman Flack
Hi, The item on hash indexes reminded me of an old comment from years ago that I put in the code of the first custom PG datatype I ever built at $work: COMMENT ON OPERATOR CLASS puid_ops USING btree IS 'As puids are only identifiers, there is no obvious reason to define ordering operators or supp

Re: [HACKERS] PG10 Crash-safe and replicable Hash Indexes and UNIQUE

2017-05-19 Thread Tom Lane
Chapman Flack writes: > Was my guess about the reason right? Does this PG10 announcement > also mean it will be possible to use UNIQUE constraints with some > pure-identifier, no-natural-ordering type that supports only hashing? No, nobody's done anything about allowing hash indexes to support un

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Heikki Linnakangas
On 05/19/2017 06:05 PM, Stephen Frost wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: Robert Haas writes: On Thu, May 18, 2017 at 11:00 PM, Tom Lane wrote: The reason PGSSTrackLevel is "unrecognized" is that it's not in typedefs.list, which is a deficiency in our typedef-collection technology

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Tom Lane
Heikki Linnakangas writes: > You can get a pretty good typedefs list just by looking for the pattern > "} ;". That's going to catch a lot of things that are just variables, though. It might be all right as long as there was manual filtering after it. regards, tom lane

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Bruce Momjian
On Fri, May 19, 2017 at 11:22:54AM -0400, Tom Lane wrote: > We've had reasonably decent luck with tracking the tzcode/tzdata packages > as local copies, so I feel like we're not taking on anything unreasonable > if our model is that we'll occasionally (not oftener than once per year) > update our c

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Heikki Linnakangas
On 05/19/2017 06:48 PM, Tom Lane wrote: Heikki Linnakangas writes: You can get a pretty good typedefs list just by looking for the pattern "} ;". That's going to catch a lot of things that are just variables, though. It might be all right as long as there was manual filtering after it. At a

Re: [HACKERS] [ANNOUNCE] PostgreSQL 10 Beta 1 Released!

2017-05-19 Thread Bruce Momjian
On Fri, May 19, 2017 at 04:10:09AM +, Huong Dangminh wrote: > Hi, > > > * 10 Beta Release Notes: > > https://www.postgresql.org/docs/devel/static/release-10.html > > Just a minute thing, but changing of hot_standby default value is not fully > noted in release-10.sgml. > Please find the at

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Robert Haas
On Fri, May 19, 2017 at 11:22 AM, Tom Lane wrote: > I certainly would rather that our version matched something that's under > active maintenance someplace. But it seems like there are two good > arguments for having a copy in our tree: > > * easy accessibility for PG developers > > * at any give

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Andres Freund
On 2017-05-19 12:21:52 -0400, Robert Haas wrote: > On Fri, May 19, 2017 at 11:22 AM, Tom Lane wrote: > > I certainly would rather that our version matched something that's under > > active maintenance someplace. But it seems like there are two good > > arguments for having a copy in our tree: > >

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Tom Lane
Robert Haas writes: > On Fri, May 19, 2017 at 11:22 AM, Tom Lane wrote: >> I certainly would rather that our version matched something that's under >> active maintenance someplace. But it seems like there are two good >> arguments for having a copy in our tree: >> >> * easy accessibility for PG

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Tom Lane
Heikki Linnakangas writes: > On 05/19/2017 06:48 PM, Tom Lane wrote: >> That's going to catch a lot of things that are just variables, though. >> It might be all right as long as there was manual filtering after it. > At a quick glance, there are only a couple of them. This two cases > caught my

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Tom Lane
Andres Freund writes: > On 2017-05-19 12:21:52 -0400, Robert Haas wrote: >> Yeah, but those advantages could also be gained by putting the >> pgindent tree on git.postgresql.org in a separate repository. Having >> it in the same repository as the actual PostgreSQL code is not >> required nor, in

[HACKERS] Allowing dash character in LTREE

2017-05-19 Thread Cyril Auburtin
I propose to allow the `-` char in allowed label characters (currently a-zA-Z0-9_ https://www.postgresql.org/docs/9.6/static/ltree.html) The reason is to allow to use more easily base64 ids, (like https://github.com/dylang/shortid, ...), uuid's too in labels `-` is also not used as a query operat

Re: [HACKERS] [POC] hash partitioning

2017-05-19 Thread Robert Haas
On Fri, May 19, 2017 at 5:32 AM, amul sul wrote: > Updated patch attached. 0001-patch rebased against latest head. > 0002-patch also incorporates code comments and error message changes > as per Robert's & your suggestions. Thanks ! -if (spec->strategy != PARTITION_STRATEGY_LIST)

[HACKERS] release note addition

2017-05-19 Thread Peter Eisentraut
A small patch for the release notes. The first hunk removes a duplicate item. The second hunk adds another item to the incompatibility list. I can commit this myself but want to give Bruce a chance so I don't mess up his workflow. -- Peter Eisentraut http://www.2ndQuadrant.com/ Po

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Alvaro Herrera
Tom Lane wrote: > Robert Haas writes: > > Yeah, but those advantages could also be gained by putting the > > pgindent tree on git.postgresql.org in a separate repository. Having > > it in the same repository as the actual PostgreSQL code is not > > required nor, in my opinion, particularly desir

Re: [HACKERS] release note addition

2017-05-19 Thread Bruce Momjian
On Fri, May 19, 2017 at 01:35:41PM -0400, Peter Eisentraut wrote: > A small patch for the release notes. The first hunk removes a duplicate > item. The second hunk adds another item to the incompatibility list. > > I can commit this myself but want to give Bruce a chance so I don't mess > up his

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Tom Lane
I wrote: > What I was just looking at is the possibility of absorbing struct > tags ("xllist" in the above) as if they were typedef names. In > at least 95% of our usages, if a struct has a tag then the tag is > also the struct's typedef name. The reason this is interesting > is that it looks lik

Re: [HACKERS] Event triggers + table partitioning cause server crash in current master

2017-05-19 Thread Robert Haas
On Wed, May 17, 2017 at 5:34 PM, Noah Misch wrote: > [Action required within three days. This is a generic notification.] > > The above-described topic is currently a PostgreSQL 10 open item. Robert, > since you committed the patch believed to have created it, you own this open > item. If some

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Peter Eisentraut
On 5/19/17 13:31, Alvaro Herrera wrote: > I favor having indent in a separate repository in our Git server, for > these reasons I am also in favor of that. > 0. it's under our control (so we can change rules as we see fit) > 1. we can have Piotr as a committer there > 2. we can use the same pgind

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Peter Eisentraut
On 5/19/17 11:22, Tom Lane wrote: > I certainly would rather that our version matched something that's under > active maintenance someplace. But it seems like there are two good > arguments for having a copy in our tree: Is pgindent going to be indented by pgindent? -- Peter Eisentraut

Re: [HACKERS] Re: [BUGS] BUG #14657: Server process segmentation fault in v10, May 10th dev snapshot

2017-05-19 Thread Robert Haas
On Fri, May 19, 2017 at 6:07 AM, Ashutosh Bapat wrote: > We still have the same copy shared across multiple append paths and > set_plan_refs would change change it underneath those. May not be a > problem right now but may be a problem in the future. I agree. I think it's better for the path-cre

Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur

2017-05-19 Thread Robert Haas
On Thu, May 18, 2017 at 8:11 PM, Michael Paquier wrote: > On Thu, May 18, 2017 at 11:30 PM, Robert Haas wrote: >> On Thu, May 18, 2017 at 7:06 AM, Michael Paquier >> wrote: >>> FWIW, I am of the opinion to not have an implementation based on any >>> SQLSTATE codes, as well as not doing something

Re: [HACKERS] Multiple table synchronizations are processed serially

2017-05-19 Thread Peter Eisentraut
On 5/19/17 01:01, Masahiko Sawada wrote: > Seems all four table sync workers are launched at the almost same > time, but three workers of them get stuck in idle transaction state > when creating replication slot. That is these waiting workers cannot > proceed its work until first connected table sy

[HACKERS] Precision and rounding fixes for money type

2017-05-19 Thread Tom Lane
I looked a bit more carefully at cash.c in the wake of bug #14663, https://www.postgresql.org/message-id/20170519164653.29941.19098%40wrigleys.postgresql.org It seems to me that there are three different bugs in the multiplication and division operators: 1. As noted in the bug thread, applying ri

Re: [HACKERS] [Bug fix]If recovery.conf has target_session_attrs=read-write, the standby fails to start.

2017-05-19 Thread Robert Haas
On Fri, May 19, 2017 at 12:51 AM, Michael Paquier wrote: > On Fri, May 19, 2017 at 1:16 PM, Higuchi, Daisuke > wrote: >> The reason of this problem is that sending 'show transaction_read_only' is >> failed. >> 'show' must be in uppercase letters because the streaming replication >> protocol onl

Re: [HACKERS] Preliminary results for proposed new pgindent implementation

2017-05-19 Thread Tom Lane
Peter Eisentraut writes: > On 5/19/17 11:22, Tom Lane wrote: >> I certainly would rather that our version matched something that's under >> active maintenance someplace. But it seems like there are two good >> arguments for having a copy in our tree: > Is pgindent going to be indented by pginden

Re: [HACKERS] Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified

2017-05-19 Thread Robert Haas
On Tue, May 16, 2017 at 11:58 PM, Michael Paquier wrote: > Thanks for the updated patch. This looks good to me. Committed. I also added a slight tweak to the wording of the documentation. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via

Re: [HACKERS] [Bug fix]If recovery.conf has target_session_attrs=read-write, the standby fails to start.

2017-05-19 Thread Tom Lane
"Higuchi, Daisuke" writes: > By adding flex option '-i', replication command parser could be more > flexible. > This option is already used for syncrep_scanner.c, so it is not strange to > add for repl_scanner.c too. Really? That wasn't an especially bright idea IMO, because it means that th

Re: [HACKERS] HINT message for "ALTER SUBSCRIPTION.. WITH" need to change with SET keyword

2017-05-19 Thread Peter Eisentraut
On 5/19/17 06:58, Dilip Kumar wrote: > On Fri, May 19, 2017 at 3:41 PM, tushar wrote: >> postgres=# drop subscription sub; >> ERROR: could not connect to publisher when attempting to drop the >> replication slot "pub" >> DETAIL: The error was: could not connect to server: No such file or >> dire

Re: [HACKERS] bumping HASH_VERSION to 3

2017-05-19 Thread Robert Haas
On Tue, May 16, 2017 at 9:25 AM, Amit Kapila wrote: > On Tue, May 16, 2017 at 5:14 PM, Robert Haas wrote: >> On Tue, May 16, 2017 at 7:31 AM, Amit Kapila wrote: >>> I will send an updated patch once we agree on above points. >> >> Sounds good. > > Attached patch addresses all the comments as dis

Re: [HACKERS] Removal of plaintext password type references

2017-05-19 Thread Robert Haas
On Thu, May 18, 2017 at 2:37 AM, Heikki Linnakangas wrote: > I still don't think this worth it to change the hook function's signature > for this. Even though it's not a big deal for external modules to adapt, > it's not zero effort either. And it's not that much nicer to us. I favor committing t

Re: [HACKERS] Removal of plaintext password type references

2017-05-19 Thread Tom Lane
Robert Haas writes: > On Thu, May 18, 2017 at 2:37 AM, Heikki Linnakangas wrote: >> I still don't think this worth it to change the hook function's signature >> for this. Even though it's not a big deal for external modules to adapt, >> it's not zero effort either. And it's not that much nicer to

Re: [HACKERS] Multiple table synchronizations are processed serially

2017-05-19 Thread Petr Jelinek
On 19/05/17 21:47, Peter Eisentraut wrote: > On 5/19/17 01:01, Masahiko Sawada wrote: >> Seems all four table sync workers are launched at the almost same >> time, but three workers of them get stuck in idle transaction state >> when creating replication slot. That is these waiting workers cannot >

Re: [HACKERS] transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

2017-05-19 Thread Thomas Munro
On Fri, May 19, 2017 at 6:35 PM, Amit Langote wrote: > On 2017/05/19 15:16, Thomas Munro wrote: >> Would TransitionCaptureState be a better name for this struct? > > Yes. Although, losing the Trigger prefix might make it sound a bit > ambiguous though. Right above its definition, we have Trigger

Re: [HACKERS] TAP tests - installcheck vs check

2017-05-19 Thread Peter Eisentraut
A couple of thoughts I've been having that relate to this: The traditional meaning of "installcheck" in GNU packages is to test against the installed code, whereas "check" tests before installation. Our concept of testing against a running server obviously does not apply to many kinds of software,

Re: [HACKERS] Introducing SNI in TLS handshake for SSL connections

2017-05-19 Thread Peter Eisentraut
On 4/24/17 22:26, Florin Asavoaie wrote: > If there's nobody against this, I can try to do the patch myself, > doesn't look too difficult (I expect it to simply work by > calling SSL_set_tlsext_host_name(SSL_context, PQhost(conn))) somewhere > in initialize_SSL in fe-secure-openssl.c. I had to loo

Re: [HACKERS] transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)

2017-05-19 Thread Thomas Munro
On Sat, May 20, 2017 at 10:43 AM, Thomas Munro wrote: > On Fri, May 19, 2017 at 6:35 PM, Amit Langote > wrote: >> On 2017/05/19 15:16, Thomas Munro wrote: >>> Would TransitionCaptureState be a better name for this struct? >> >> Yes. Although, losing the Trigger prefix might make it sound a bit >

Re: [HACKERS] [Bug fix]If recovery.conf has target_session_attrs=read-write, the standby fails to start.

2017-05-19 Thread Michael Paquier
On Sat, May 20, 2017 at 5:32 AM, Tom Lane wrote: > We'd probably be better off to implement case-insensitivity the hard way. > There is a reason why none of our other flex scanners use this switch. Do you think that it would be better to list the letter list for each keyword in repl_scanner.l or

Re: [HACKERS] [Bug fix]If recovery.conf has target_session_attrs=read-write, the standby fails to start.

2017-05-19 Thread Tom Lane
Michael Paquier writes: > Do you think that it would be better to list the letter list for each > keyword in repl_scanner.l or have something more generic? As not that > many commands are added in the replication protocol, I would think > that this is more than enough for each command, say: > [Ss]

Re: [HACKERS] Regression in join selectivity estimations when using foreign keys

2017-05-19 Thread David Rowley
On 18 May 2017 at 20:28, David Rowley wrote: > A vastly simplified example case is: > > create table fkest (a int, b int, c int unique, primary key(a,b)); > create table fkest1 (a int, b int, primary key(a,b)); > > insert into fkest select x/10,x%10, x from generate_Series(1,400) x; > insert into

Re: [HACKERS] [POC] Faster processing at Gather node

2017-05-19 Thread Amit Kapila
On Fri, May 19, 2017 at 5:58 PM, Robert Haas wrote: > On Fri, May 19, 2017 at 7:55 AM, Rafia Sabih > wrote: >> While analysing the performance of TPC-H queries for the newly developed >> parallel-operators, viz, parallel index, bitmap heap scan, etc. we noticed >> that the time taken by gather no

Re: [HACKERS] Removal of plaintext password type references

2017-05-19 Thread Robert Haas
On Fri, May 19, 2017 at 5:31 PM, Tom Lane wrote: >> Anyone else want to vote? So far I count 3-1 in favor of making this change. > > Actually, on looking at the final form of the patch, it's hard to think > that it's not just useless API churn. The one existing hook user would > have to turn aro

Re: [HACKERS] bumping HASH_VERSION to 3

2017-05-19 Thread Amit Kapila
On Sat, May 20, 2017 at 2:24 AM, Robert Haas wrote: > On Tue, May 16, 2017 at 9:25 AM, Amit Kapila wrote: >> On Tue, May 16, 2017 at 5:14 PM, Robert Haas wrote: >>> On Tue, May 16, 2017 at 7:31 AM, Amit Kapila >>> wrote: I will send an updated patch once we agree on above points. >>> >>>

Re: [HACKERS] Removal of plaintext password type references

2017-05-19 Thread Tom Lane
Robert Haas writes: > I guess it does seem likely that most users of the hook would need to > do the same, but it seems confusing to pass the same function both x > and f(x), so my vote is to not do that. I guess what's in the back of my mind is that the password type might someday not be just a

Re: [HACKERS] Improvement in log message of logical replication worker

2017-05-19 Thread Noah Misch
On Thu, May 18, 2017 at 12:36:46PM +0900, Masahiko Sawada wrote: > On Thu, May 18, 2017 at 11:29 AM, Peter Eisentraut > wrote: > > On 5/12/17 00:30, Masahiko Sawada wrote: > >> I got same log messages 'starting logical replication worker for > >> subscription' total 5 times but actually 4 of them

Re: [HACKERS] Improvement in log message of logical replication worker

2017-05-19 Thread Alvaro Herrera
Umm, just skimming here -- this patch shows some LOG messages using elog() rather than ereport(), which seems bogus to me. Also: "logical replication table synchronization worker for subscription \"%s\", table \"%s\" has started" surely there is a more convenient name than "logical replic

Re: [HACKERS] Re: proposal - using names as primary names of plpgsql function parameters instead $ based names

2017-05-19 Thread Pavel Stehule
2017-05-19 5:48 GMT+02:00 Pavel Stehule : > > > 2017-05-19 3:14 GMT+02:00 Peter Eisentraut com>: > >> On 5/15/17 14:34, Pavel Stehule wrote: >> > Now, I when I working on plpgsql_check, I have to check function >> > parameters. I can use fn_vargargnos and out_param_varno for list of >> >