Re: [HACKERS] logical replication - still unstable after all these months

2017-05-30 Thread Erik Rijkers
On 2017-05-26 08:10, Erik Rijkers wrote: If you run a pgbench session of 1 minute over a logical replication connection and repeat that 100x this is what you get: At clients 90, 64, 8, scale 25: -- out_20170525_0944.txt 100 -- pgbench -c 90 -j 8 -T 60 -P 12 -n -- scale 25 7 -- Not

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

2017-05-30 Thread Noah Misch
On Tue, May 30, 2017 at 01:30:35AM +, Noah Misch wrote: > On Thu, May 18, 2017 at 10:27:51PM -0400, Peter Eisentraut wrote: > > On 5/18/17 11:11, Noah Misch wrote: > > > IMMEDIATE ATTENTION REQUIRED. This PostgreSQL 10 open item is past due > > > for > > > your status update. Please reacquai

Re: [HACKERS] Range Merge Join v1

2017-05-30 Thread Andrew Borodin
Hi, Jeff! Sorry for being late. Actually, I had several unsuccessful attempts to find something wrong with the patch. Here's my review. in pathkey.c ecs = (EquivalenceClass **) palloc(nClauses * sizeof(EquivalenceClass *)); scores = (int *) palloc(nClauses * sizeof(int)); range_ecs = palloc(nCla

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

2017-05-30 Thread Noah Misch
On Tue, May 30, 2017 at 01:34:33AM +, Noah Misch wrote: > This PostgreSQL 10 open item is past due for your status update. Kindly send > a status update within 24 hours, and include a date for your subsequent status > update. Refer to the policy on open item ownership: > https://www.postgresq

Re: [HACKERS] Effect of changing the value for PARALLEL_TUPLE_QUEUE_SIZE

2017-05-30 Thread Ashutosh Bapat
> > I did a little bit of brief experimentation on this same topic a long > time ago and didn't see an improvement from boosting the queue size > beyond 64k but Rafia is testing Gather rather than Gather Merge and, > as I say, my test was very brief. I think it would be a good idea to > try to get

Re: [HACKERS] "create publication..all tables" ignore 'partition not supported' error

2017-05-30 Thread Kuntal Ghosh
On Wed, May 31, 2017 at 12:58 AM, Masahiko Sawada wrote: > > I'd say we can fix this issue by just changing the query. Attached > patch changes the query so that it can handle publication name > correctly, the query gets complex, though. > In is_publishable_class function, there are four condition

Re: [HACKERS] [PATCH] quiet conversion warning in DatumGetFloat4

2017-05-30 Thread Tom Lane
Chapman Flack writes: > On 05/31/17 01:26, Tom Lane wrote: >> Hm. I think it would be better to use DatumGetInt32 here. Arguably, >> direct use of GET_4_BYTES and its siblings should only appear in >> DatumGetFoo macros. > Like so? Looks promising offhand, but I'm too tired to check in detail

Re: [HACKERS] [PATCH] quiet conversion warning in DatumGetFloat4

2017-05-30 Thread Chapman Flack
On 05/31/17 01:26, Tom Lane wrote: > Hm. I think it would be better to use DatumGetInt32 here. Arguably, > direct use of GET_4_BYTES and its siblings should only appear in > DatumGetFoo macros. Like so? These are the 4 sites where {GET,SET}_n_BYTES got introduced in 14cca1b (for consistency, tho

Re: [HACKERS] [PATCH] quiet conversion warning in DatumGetFloat4

2017-05-30 Thread Tom Lane
Chapman Flack writes: > - myunion.value = GET_4_BYTES(X); > + myunion.value = (int32)GET_4_BYTES(X); Hm. I think it would be better to use DatumGetInt32 here. Arguably, direct use of GET_4_BYTES and its siblings should only appear in DatumGetFoo macros. regards,

Re: [HACKERS] TAP backpatching policy

2017-05-30 Thread Stephen Frost
Tom, On Wed, May 31, 2017 at 01:16 Tom Lane wrote: > Stephen Frost writes: > > In the end, the experiences I've had with pg_dump of late and trying to > > ensure that pg_dump 9.6 is able to work all the way back to *7.0*, makes > > me think that this notion of putting the one-and-only real test

Re: [HACKERS] TAP backpatching policy

2017-05-30 Thread Tom Lane
Stephen Frost writes: > In the end, the experiences I've had with pg_dump of late and trying to > ensure that pg_dump 9.6 is able to work all the way back to *7.0*, makes > me think that this notion of putting the one-and-only real test-suite we > have into the core repo almost laughable. um... w

Re: [HACKERS] ECPG: pg_type.h file is not synced

2017-05-30 Thread Michael Meskes
> Bruce Momjian writes: > > > > But I think the "ecpg/ecpglib/pg_type.h" file is currently not > > > > synced > > > > with the above file. > > Should we add some Makefile magic to make sure they stay in sync? > > Not so much that as teach genbki.pl to generate this file too. > I think that might

[HACKERS] [PATCH] quiet conversion warning in DatumGetFloat4

2017-05-30 Thread Chapman Flack
It seems that 14cca1b (use static inline functions for float <-> Datum conversions) has an implicit narrowing conversion in one of those functions. If building an extension with gcc's -Wconversion warning enabled (*cough* pljava *cough* ... the Maven plugin that runs the compiler enables the warni

Re: [HACKERS] TAP backpatching policy

2017-05-30 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * Craig Ringer (cr...@2ndquadrant.com) wrote: > >> At the moment that'd be 9.5, since that's where PostgresNode was > >> introduced. But if I can find the time I'd quite like to backport > >> PostgresNode to 9.4 too. > > > M

Re: [HACKERS] TAP backpatching policy

2017-05-30 Thread Tom Lane
Stephen Frost writes: > * Craig Ringer (cr...@2ndquadrant.com) wrote: >> At the moment that'd be 9.5, since that's where PostgresNode was >> introduced. But if I can find the time I'd quite like to backport >> PostgresNode to 9.4 too. > Makes sense to me. Um ... but we still have 2 live pre-9.4

Re: [HACKERS] TAP backpatching policy

2017-05-30 Thread Stephen Frost
Craig, * Craig Ringer (cr...@2ndquadrant.com) wrote: > I propose that we backpatch all practical TAP enhancements back to the > last supported back branch. Thanks for bringing this up. I tend to agree, as we really want to have better testing of PostgreSQL in all of our branches and being able t

Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-05-30 Thread David G. Johnston
Stephen, On Tue, May 30, 2017 at 8:41 PM, Stephen Frost wrote: > David, > > * David G. Johnston (david.g.johns...@gmail.com) wrote: > > On Fri, May 26, 2017 at 7:47 AM, Stephen Frost > wrote: > > > * Robins Tharakan (thara...@gmail.com) wrote: > > > > Attached is a patch adds a --no-comments ar

Re: [HACKERS] Adding support for Default partition in partitioning

2017-05-30 Thread Beena Emerson
On Wed, May 31, 2017 at 8:13 AM, Amit Langote wrote: > On 2017/05/31 9:33, Amit Langote wrote: > > > In get_rule_expr(): > > case PARTITION_STRATEGY_LIST: > Assert(spec->listdatums != NIL); > > +/* > + *

Re: [HACKERS] pg_config --version-num

2017-05-30 Thread David G. Johnston
On Tue, May 30, 2017 at 8:07 PM, Tom Lane wrote: > Hm, but with this you're trading that problem for "is the right version > of pg_config in my PATH?". > That is probably a solved problem for those who are parsing the output of --version today. ​ > > This idea might well be useful for external

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-30 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > but without actual interoperability testing it sounds pretty > speculative to me. I'm all for interoperability testing. When we have multiple implementations of TLS using different libraries with various versions of PostgreSQL and libpq and

Re: [HACKERS] pg_config --version-num

2017-05-30 Thread David G. Johnston
On Tue, May 30, 2017 at 6:36 PM, Michael Paquier wrote: > On Tue, May 30, 2017 at 6:14 PM, Craig Ringer > wrote: > > Attached is a small patch to teach pg_config how to output a > --version-num > > > > With Pg 10, parsing versions got more annoying. Especially with > > "10beta1", "9.6beta2" etc

Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-05-30 Thread Stephen Frost
David, * David G. Johnston (david.g.johns...@gmail.com) wrote: > On Fri, May 26, 2017 at 7:47 AM, Stephen Frost wrote: > > * Robins Tharakan (thara...@gmail.com) wrote: > > > Attached is a patch adds a --no-comments argument to pg_dump to skip > > > generation of COMMENT statements when generatin

Re: [HACKERS] Why does logical replication launcher set application_name?

2017-05-30 Thread Peter Eisentraut
Here is a proposed solution that splits bgw_name into bgw_type and bgw_name_extra. bgw_type shows up in pg_stat_activity.backend_type. Uses of application_name are removed, because they are no longer necessary to identity the process type. This code appears to be buggy because I sometimes get NUL

Re: [HACKERS] pg_config --version-num

2017-05-30 Thread Tom Lane
Craig Ringer writes: > On 31 May 2017 9:36 am, "Michael Paquier" wrote: >> Is the data in Makefile.global unsufficient? > It's a pain in the butt because then you need to find or get passed the > name of Makefile.global. Then you have to template it out into a file. Or > parse the Makefile. Or c

Re: [HACKERS] Adding support for Default partition in partitioning

2017-05-30 Thread Amit Langote
On 2017/05/31 9:33, Amit Langote wrote: > On 2017/05/30 16:38, Jeevan Ladhe wrote: >> I have rebased the patch on the latest commit. >> PFA. > > Was looking at the patch I tried creating default partition of a range-partitioned table and got the following error: ERROR: invalid bound specificati

Re: [HACKERS] pg_config --version-num

2017-05-30 Thread Craig Ringer
On 31 May 2017 9:36 am, "Michael Paquier" wrote: On Tue, May 30, 2017 at 6:14 PM, Craig Ringer wrote: > Attached is a small patch to teach pg_config how to output a --version-num > > With Pg 10, parsing versions got more annoying. Especially with > "10beta1", "9.6beta2" etc into the mix. It make

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-30 Thread Álvaro Hernández Tortosa
On 31/05/17 03:39, Michael Paquier wrote: On Tue, May 30, 2017 at 5:59 PM, Robert Haas wrote: That sounds like undue optimism to me. Unless somebody's tested that Michael's proposed implementation, which uses undocumented OpenSSL APIs, actually interoperates properly with a SCRAM + channel b

Re: [HACKERS] TAP backpatching policy

2017-05-30 Thread Michael Paquier
On Tue, May 30, 2017 at 6:12 PM, Craig Ringer wrote: > Thoughts? Backpatch new TAP methods, etc, into back branches routinely? FWIW, I'd love to see a committer helping into getting this facility back-patched at least to 9.5. The least I can do is a commitment as a reviewer of such a patch. So co

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-30 Thread Michael Paquier
On Tue, May 30, 2017 at 5:59 PM, Robert Haas wrote: > That sounds like undue optimism to me. Unless somebody's tested that > Michael's proposed implementation, which uses undocumented OpenSSL > APIs, actually interoperates properly with a SCRAM + channel binding > implementation based on some oth

Re: [HACKERS] pg_config --version-num

2017-05-30 Thread Michael Paquier
On Tue, May 30, 2017 at 6:14 PM, Craig Ringer wrote: > Attached is a small patch to teach pg_config how to output a --version-num > > With Pg 10, parsing versions got more annoying. Especially with > "10beta1", "9.6beta2" etc into the mix. It makes no sense to force > tools and scripts to do this

Re: [HACKERS] Adding support for Default partition in partitioning

2017-05-30 Thread Jeevan Ladhe
Thanks Amit for your comments. On 31-May-2017 6:03 AM, "Amit Langote" wrote: Hi Jeevan, On 2017/05/30 16:38, Jeevan Ladhe wrote: > I have rebased the patch on the latest commit. > PFA. Was looking at the patch and felt that the parse node representation of default partition bound could be slig

[HACKERS] pg_config --version-num

2017-05-30 Thread Craig Ringer
Hi all Attached is a small patch to teach pg_config how to output a --version-num With Pg 10, parsing versions got more annoying. Especially with "10beta1", "9.6beta2" etc into the mix. It makes no sense to force tools and scripts to do this when we can just expose a sensible pre-formatted one at

[HACKERS] TAP backpatching policy

2017-05-30 Thread Craig Ringer
Hi all I propose that we backpatch all practical TAP enhancements back to the last supported back branch. At the moment that'd be 9.5, since that's where PostgresNode was introduced. But if I can find the time I'd quite like to backport PostgresNode to 9.4 too. Where needed, PostgresNode could h

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-30 Thread Robert Haas
On Tue, May 30, 2017 at 1:00 PM, Stephen Frost wrote: > All-in-all, this sounds like it's heading in the right direction, at > least at a high level. Glad to see that there's been consideration of > other TLS implementations, and as such I don't think we need to be > overly concerned about the sp

Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-05-30 Thread David G. Johnston
On Fri, May 26, 2017 at 7:47 AM, Stephen Frost wrote: > Greetings, > > * Robins Tharakan (thara...@gmail.com) wrote: > > Attached is a patch adds a --no-comments argument to pg_dump to skip > > generation of COMMENT statements when generating a backup. This is > crucial > > for non-superusers to

Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-30 Thread Andres Freund
On 2017-05-30 18:21:10 -0400, Alvaro Herrera wrote: > Alexander Sosna wrote: > > Hi, > > > > I can reproduce a segmentation fault when creating a BRIN concurrently > > with set pages_per_range and autosummarize. > > Pushed fix just now. Please give it a try. Thanks for testing and > reporting,

[HACKERS] TAP: allow overriding PostgresNode in get_new_node

2017-05-30 Thread Craig Ringer
Hi all More and more I'm finding it useful to extend PostgresNode for project specific helper classes. But PostgresNode::get_new_node is a factory that doesn't provide any mechanism for overriding, so you have to create a PostgresNode then re-bless it as your desired subclass. Ugly. The attached

Re: [HACKERS] Adding support for Default partition in partitioning

2017-05-30 Thread Amit Langote
Hi Jeevan, On 2017/05/30 16:38, Jeevan Ladhe wrote: > I have rebased the patch on the latest commit. > PFA. Was looking at the patch and felt that the parse node representation of default partition bound could be slightly different. Can you explain the motivation behind implementing it without a

[HACKERS] An incomplete comment sentence in subtrans.c

2017-05-30 Thread Masahiko Sawada
Hi, There is an incomplete sentence at top of subtrans.c file. I think the commit 88e66d19 removed the whole line mistakenly. Attached patch fixes this. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center fix_comment_subtrans_c.patch Descript

Re: [HACKERS] PATCH: recursive json_populate_record()

2017-05-30 Thread Nikita Glukhov
On 30.05.2017 02:31, Tom Lane wrote: Nikita Glukhov writes: 2. Also I've found a some kind of thinko in JsGetObjectSize() macro, but it seems that this obvious mistake can not lead to incorrect behavior. Hm, I think it actually was wrong for the case of jsonb_cont == NULL, wasn't it? Yes, J

Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces

2017-05-30 Thread Mark Dilger
> On May 29, 2017, at 11:53 AM, Bruce Momjian wrote: > > Right now we don't document that temp_tablespaces can use > non-restart-safe storage, e.g. /tmp, ramdisks. Would this be safe? > Should we document this? The only safe way to do temporary tablespaces that I have found is to extend the g

Re: [HACKERS] syscache entries out of order

2017-05-30 Thread Tom Lane
Mark Dilger writes: > Just FYI, as of 665d1fad99e7b11678b0d5fa24d2898424243cd6, syscache.h > entries are not in alphabetical order, which violates the coding standard > specified in the comment for these entries. In particular, it is the > PUBLICATION > and SUBSCRIPTION entries that are mis-orde

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-05-30 Thread Thomas Munro
On Fri, May 19, 2017 at 2:05 PM, Michael Paquier wrote: > On Thu, May 18, 2017 at 1:43 PM, Thomas Munro > wrote: >> On Thu, May 11, 2017 at 1:48 PM, Michael Paquier >> wrote: >>> I had my eyes on the WAL sender code this morning, and I have noticed >>> that walsender.c is not completely consiste

Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-30 Thread Alvaro Herrera
Alexander Sosna wrote: > Hi, > > I can reproduce a segmentation fault when creating a BRIN concurrently > with set pages_per_range and autosummarize. Pushed fix just now. Please give it a try. Thanks for testing and reporting, -- Álvaro Herrerahttps://www.2ndQuadrant.com/ Post

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-30 Thread Robert Haas
On Tue, May 30, 2017 at 4:38 PM, Tom Lane wrote: > It'd be interesting if people could gather similar numbers on other > platforms of more real-world relevance, such as ppc64. But based on > this small sample, I wouldn't object to just going to -fPIC across > the board. That seems pretty sensibl

Re: [HACKERS] ECPG: pg_type.h file is not synced

2017-05-30 Thread Tom Lane
Bruce Momjian writes: >>> But I think the "ecpg/ecpglib/pg_type.h" file is currently not synced >>> with the above file. > Should we add some Makefile magic to make sure they stay in sync? Not so much that as teach genbki.pl to generate this file too. I think that might be a good idea, but perso

Re: [HACKERS] ECPG: pg_type.h file is not synced

2017-05-30 Thread Bruce Momjian
On Tue, May 23, 2017 at 10:25:13AM +0200, Michael Meskes wrote: > Hi, > > > I am looking at ECPG source code. In the "ecpg/ecpglib/pg_type.h" file I > > have seen following comment: > > > > ** keep this in sync with src/include/catalog/pg_type.h* > > > > But I think the "ecpg/ecpglib/pg_type.h"

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-30 Thread Tom Lane
I wrote: > Very possibly true, but I wish we had some hard facts and not just > guesses. As a simple but on-point test, I compared sizes of postgres_fdw.so built with -fpic and -fPIC. I no longer have access to a wide variety of weird architectures, but on what I do have in my office: x86_64, RH

[HACKERS] syscache entries out of order

2017-05-30 Thread Mark Dilger
Peter, Just FYI, as of 665d1fad99e7b11678b0d5fa24d2898424243cd6, syscache.h entries are not in alphabetical order, which violates the coding standard specified in the comment for these entries. In particular, it is the PUBLICATION and SUBSCRIPTION entries that are mis-ordered. Sorry for my peda

Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-30 Thread Alvaro Herrera
Tom Lane wrote: > Alexander Sosna writes: > > I can reproduce a segmentation fault when creating a BRIN concurrently > > with set pages_per_range and autosummarize. > > I wonder if this isn't the same issue reported in > https://www.postgresql.org/message-id/flat/20170524063323.29941.46339%40wrig

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-30 Thread Daniel Gustafsson
> On 30 May 2017, at 16:50, Tom Lane wrote: > > Robert Haas writes: >> On Sat, May 27, 2017 at 5:59 PM, Álvaro Hernández Tortosa >> wrote: >>> - tls-unique, as you mentioned, uses two undocumented APIs. This raises a >>> small flag about the stability and future of those APIs. > >> It seems to

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-30 Thread Daniel Gustafsson
> On 30 May 2017, at 18:25, Michael Paquier wrote: > > On macos though it is another story, I am not seeing anything: > https://developer.apple.com/reference/security/secure_transport#symbols The Secure Transport documentation unfortunately excel at being incomplete and hard to search in. That

Re: [HACKERS] "create publication..all tables" ignore 'partition not supported' error

2017-05-30 Thread Masahiko Sawada
On Tue, May 30, 2017 at 1:42 PM, Amit Langote wrote: > On 2017/05/22 20:02, Kuntal Ghosh wrote: >> Yeah, it's a bug. While showing the table definition, we use the >> following query for showing the related publications: >> "SELECT pub.pubname\n" >> " FROM pg_catalog.

Re: [HACKERS] Re: Create subscription with `create_slot=false` and incorrect slot name

2017-05-30 Thread Peter Eisentraut
On 5/29/17 22:26, Noah Misch wrote: > On Fri, May 26, 2017 at 05:05:37PM -0400, Peter Eisentraut wrote: >> On 5/25/17 19:16, Petr Jelinek wrote: The reported error is just one of many errors that can happen when DROP SUBSCRIPTION tries to drop the slot (doens't exist, still active, no >>>

Re: [HACKERS] Create subscription with `create_slot=false` and incorrect slot name

2017-05-30 Thread Peter Eisentraut
On 5/25/17 17:26, Peter Eisentraut wrote: > Another way to fix this particular issue is to not verify the > replication slot name before doing the drop. After all, if the name is > not valid, then you can also just report that it doesn't exist. Here is a possible patch along these lines. -- Pet

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-05-30 Thread Michael Paquier
On Tue, May 30, 2017 at 11:09 AM, Peter Eisentraut wrote: > I don't think this is my item. Most of the behavior is old, and > pg_stat_get_wal_receiver() is from commit > b1a9bad9e744857291c7d5516080527da8219854. > > I would appreciate if another committer can take the lead on this. Those things

Re: [HACKERS] Re: pg_dump ignoring information_schema tables which used in Create Publication.

2017-05-30 Thread Peter Eisentraut
On 5/29/17 22:14, Noah Misch wrote: > On Fri, May 26, 2017 at 10:46:12PM -0300, Euler Taveira wrote: >> 2017-05-26 17:52 GMT-03:00 Peter Eisentraut >> : >>> You cannot publish a system catalog. But a user-created table in >>> information_schema is not a system catalog. >> Replication of informati

Re: [HACKERS] Race conditions with WAL sender PID lookups

2017-05-30 Thread Peter Eisentraut
On 5/29/17 21:38, Noah Misch wrote: >> Actually, now that I look at it, ready_to_display should as well be >> protected by the lock of the WAL receiver, so it is incorrectly placed >> in walreceiver.h. As you are pointing out, pg_stat_get_wal_receiver() >> is lazy as well, and that's new in 10, so

Re: [HACKERS] Replication status in logical replication

2017-05-30 Thread Peter Eisentraut
On 5/29/17 22:56, Noah Misch wrote: > On Fri, May 19, 2017 at 11:33:48AM +0900, Masahiko Sawada wrote: >> On Wed, Apr 12, 2017 at 5:31 AM, Simon Riggs wrote: >>> Looks like a bug that we should fix in PG10, with backpatch to 9.4 (or >>> as far as it goes). >>> >>> Objections to commit? >>> >> >> S

Re: [HACKERS] Fix GetOldestXmin comment

2017-05-30 Thread Masahiko Sawada
On Tue, May 30, 2017 at 11:07 PM, Amit Kapila wrote: > On Tue, May 30, 2017 at 6:32 AM, Masahiko Sawada > wrote: >> Hi, >> >> While reading source code, I realized that comment of GetOldestXmin mentions; >> >> * if rel = NULL and there are no transactions running in the current >> * database

Re: [HACKERS] Re: Alter subscription..SET - NOTICE message is coming for table which is already removed

2017-05-30 Thread Masahiko Sawada
On Thu, May 25, 2017 at 9:54 PM, tushar wrote: > On 05/25/2017 03:38 PM, tushar wrote: >> >> While performing - Alter subscription..SET , I found that NOTICE message >> is coming duplicate next time , which is not needed anymore. > > There is an another example - where i am getting "ERROR: subsc

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-30 Thread Christoph Berg
Re: Tom Lane 2017-05-30 <25131.1496163...@sss.pgh.pa.us> > Christoph Berg writes: > > My main point here would be that we are already setting this for all > > extensions for sparc and sparc64, so s390(x) would just follow suit. > > For some values of "we", sure ;-). Afaict for all values of "we"

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-30 Thread Tom Lane
Christoph Berg writes: > My main point here would be that we are already setting this for all > extensions for sparc and sparc64, so s390(x) would just follow suit. For some values of "we", sure ;-). But I think what is really under discussion here is whether to change -fpic to -fPIC for all pla

Re: [HACKERS] Surjective functional indexes

2017-05-30 Thread Christoph Berg
Re: Konstantin Knizhnik 2017-05-30 > > > On 29.05.2017 20:21, Christoph Berg wrote: > > > > I think the term you were looking for is "projection". > > > > https://en.wikipedia.org/wiki/Projection_(set_theory) > > I have already renamed parameter from "surjective" to "injective". > But I am o

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

2017-05-30 Thread Bruce Momjian
On Sun, May 21, 2017 at 11:01:57PM -0400, Chapman Flack wrote: > ? A transformOpclassLike function could verify that foo and the opcintype > of int4_ops have the same typlen and typbyval, and that the operators and > support procs are backed by C functions, and return a list of > CREATE OPERATOR re

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-30 Thread Stephen Frost
Michael, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Tue, May 30, 2017 at 8:14 AM, Stephen Frost wrote: > > The specific APIs are, certainly, going to be different between > > different TLS implementations and I don't believe we need to be > > particularly concerned with that (or if

Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-30 Thread Tom Lane
Alexander Sosna writes: > I can reproduce a segmentation fault when creating a BRIN concurrently > with set pages_per_range and autosummarize. I wonder if this isn't the same issue reported in https://www.postgresql.org/message-id/flat/20170524063323.29941.46339%40wrigleys.postgresql.org Could y

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-30 Thread Christoph Berg
Re: Andres Freund 2017-05-30 <20170530161541.koj5xbvvovrrt...@alap3.anarazel.de> > I think we can fix this easily enough in Citus, postgis, and whatever. > But it's not a particularly good user/developer experience, and > presumably is going to become more and more common. On x86 there > shouldn't

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-30 Thread Tom Lane
Andres Freund writes: > On 2017-05-29 15:45:11 -0400, Tom Lane wrote: >> Maybe this is small enough to not be something we need to worry about, >> but I'm wondering if we should ask citus and other large .so's to set >> some additional make flag that would cue usage of -fPIC over -fpic. > I think

Re: [HACKERS] "cannot specify finite value after UNBOUNDED" ... uh, why?

2017-05-30 Thread Robert Haas
On Tue, May 30, 2017 at 11:03 AM, Tom Lane wrote: > Robert Haas writes: >> On Mon, May 29, 2017 at 3:04 AM, Tom Lane wrote: >>> Would someone please defend the restrictions imposed by the >>> "seen_unbounded" checks in transformPartitionBound >>> (parse_utilcmd.c:3365..3396 in current HEAD)? > >

Re: [HACKERS] Effect of changing the value for PARALLEL_TUPLE_QUEUE_SIZE

2017-05-30 Thread Andres Freund
On 2017-05-30 07:27:12 -0400, Robert Haas wrote: > The other is that I figured 64k was small enough that nobody would > care about the memory utilization. I'm not sure we can assume the > same thing if we make this bigger. It's probably fine to use a 6.4M > tuple queue for each worker if work_mem

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-30 Thread Michael Paquier
On Tue, May 30, 2017 at 8:14 AM, Stephen Frost wrote: > Work has been done in that area already, as well as for LibNSS support. > > I've not had a chance to closely look over the proposed approach here, > but generally speaking, we need to be looking for a standard way to > generate and transmit t

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-30 Thread Andres Freund
On 2017-05-29 15:45:11 -0400, Tom Lane wrote: > Christoph Berg writes: > > Re: To Andres Freund 2016-04-28 <20160428080824.ga22...@msg.df7cb.de> > >>> I'm not clear why citus triggers this, when other extensions don't? > > >> Maybe it's simply because citus.so is bigger than all the other > >> ex

Re: [HACKERS] WIP Patch: Precalculate stable functions, infrastructure v1

2017-05-30 Thread Aleksander Alekseev
Hi Marina, I still don't see anything particularly wrong with your patch. It applies, passes all test, it is well test-covered and even documented. Also I've run `make installcheck` under Valgrind and didn't find any memory-related errors. Is there anything that you would like to change before we

Re: [HACKERS] ALTER PUBLICATION documentation

2017-05-30 Thread Peter Eisentraut
On 5/29/17 22:16, Noah Misch wrote: > On Wed, May 24, 2017 at 07:24:08PM -0400, Peter Eisentraut wrote: >> On 5/22/17 17:50, Jeff Janes wrote: >>> "The first variant of this command listed in the synopsis can change all >>> of the publication properties specified in CREATE PUBLICATION >>>

Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces

2017-05-30 Thread Joe Conway
On 05/30/2017 10:54 AM, Tom Lane wrote: > Bruce Momjian writes: >> On Mon, May 29, 2017 at 03:55:08PM -0400, Tom Lane wrote: >>> I'm too lazy to search the archives right now, but there was some case >>> years ago where somebody destroyed their database via an ill-thought-out >>> combination of au

Re: [HACKERS] pgbench tap tests & minor fixes

2017-05-30 Thread Fabien COELHO
Hello Nikolay, Year, this is much more clear for me. Now I understand this statistics code. Great. I still have three more questions. A new one: my_command->line = expr_scanner_get_substring(sstate, start_offset, -

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-30 Thread Stephen Frost
Tom, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > On Sat, May 27, 2017 at 5:59 PM, Álvaro Hernández Tortosa > > wrote: > >> - tls-unique, as you mentioned, uses two undocumented APIs. This raises a > >> small flag about the stability and future of those APIs. > > > It s

Re: [HACKERS] "cannot specify finite value after UNBOUNDED" ... uh, why?

2017-05-30 Thread Tom Lane
Robert Haas writes: > On Mon, May 29, 2017 at 3:04 AM, Tom Lane wrote: >> Would someone please defend the restrictions imposed by the >> "seen_unbounded" checks in transformPartitionBound >> (parse_utilcmd.c:3365..3396 in current HEAD)? > Because this is supposed to work more or less like row-co

[HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-30 Thread Alexander Sosna
Hi, I can reproduce a segmentation fault when creating a BRIN concurrently with set pages_per_range and autosummarize. # Reproduce CREATE TABLE brin_test AS SELECT series AS id, MD5(series::TEXT) AS VALUE, '2015-10-31 13:37:00.313370+01'::TIMESTAMP + (series::TEXT || '

Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces

2017-05-30 Thread Tom Lane
Bruce Momjian writes: > On Mon, May 29, 2017 at 03:55:08PM -0400, Tom Lane wrote: >> I'm too lazy to search the archives right now, but there was some case >> years ago where somebody destroyed their database via an ill-thought-out >> combination of automatic-initdb-if-$PGDATA-isn't-there and slow

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-30 Thread Tom Lane
Robert Haas writes: > On Sat, May 27, 2017 at 5:59 PM, Álvaro Hernández Tortosa > wrote: >> - tls-unique, as you mentioned, uses two undocumented APIs. This raises a >> small flag about the stability and future of those APIs. > It seems to me that the question is not just whether those APIs will

Re: [HACKERS] "cannot specify finite value after UNBOUNDED" ... uh, why?

2017-05-30 Thread Robert Haas
On Mon, May 29, 2017 at 3:04 AM, Tom Lane wrote: > Would someone please defend the restrictions imposed by the > "seen_unbounded" checks in transformPartitionBound > (parse_utilcmd.c:3365..3396 in current HEAD)? They sure look to me like > nothing but sloppy thinking, and/or protection of downstr

Re: [HACKERS] Use of non-restart-safe storage by temp_tablespaces

2017-05-30 Thread Bruce Momjian
On Mon, May 29, 2017 at 03:55:08PM -0400, Tom Lane wrote: > I'm too lazy to search the archives right now, but there was some case > years ago where somebody destroyed their database via an ill-thought-out > combination of automatic-initdb-if-$PGDATA-isn't-there and slow mounting. > We'd have to be

Re: [HACKERS] Channel binding support for SCRAM-SHA-256

2017-05-30 Thread Robert Haas
On Sat, May 27, 2017 at 5:59 PM, Álvaro Hernández Tortosa wrote: > - tls-unique, as you mentioned, uses two undocumented APIs. This raises a > small flag about the stability and future of those APIs. It seems to me that the question is not just whether those APIs will be available in future versi

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-30 Thread Tom Lane
Robert Haas writes: > On Mon, May 29, 2017 at 3:45 PM, Tom Lane wrote: >> I wonder what the overhead is of using -fPIC when -fpic would be >> sufficient. > Do we have an idea how to measure the increased overhead? Just from > reading the description, I'm guessing that the increased cost would >

Re: [HACKERS] Fix GetOldestXmin comment

2017-05-30 Thread Amit Kapila
On Tue, May 30, 2017 at 6:32 AM, Masahiko Sawada wrote: > Hi, > > While reading source code, I realized that comment of GetOldestXmin mentions; > > * if rel = NULL and there are no transactions running in the current > * database, GetOldestXmin() returns latestCompletedXid. > > However, in tha

Re: [HACKERS] [PATCH] relocation truncated to fit: citus build failure on s390x

2017-05-30 Thread Robert Haas
On Mon, May 29, 2017 at 3:45 PM, Tom Lane wrote: > I wonder what the overhead is of using -fPIC when -fpic would be > sufficient. Whatever it is, the proposed patch imposes it on every > shlib or extension, to accommodate one single extension that isn't > even one we ship. > > Maybe this is small

Re: [HACKERS] Walsender timeouts and large transactions

2017-05-30 Thread Petr Jelinek
On 30/05/17 11:02, Kyotaro HORIGUCHI wrote: > At Thu, 25 May 2017 17:52:50 +0200, Petr Jelinek > wrote in > >> Hi, >> >> We have had issue with walsender timeout when used with logical decoding >> and the transaction is taking long time to be decoded (because it >> contains many changes) >> >>

Re: [HACKERS] [COMMITTERS] Re: pgsql: Code review focused on new node types added by partitioning supp

2017-05-30 Thread Tom Lane
Robert Haas writes: I'm not really for doing it that way, but I'm willing to apply the fix if there's consensus for your position. Anybody else have an opinion? > +1 from me, too. I don't see that there's enough advantage in > avoiding a catversion bump to justify leaving this footgun

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-05-30 Thread Amit Kapila
On Tue, May 30, 2017 at 12:36 PM, Konstantin Knizhnik wrote: > On 27.10.2016 14:39, Mithun Cy wrote: > > > I wonder if you considered parallel prewarming of a table? > Right now either with pg_prewarm, either with pg_autoprewarm, preloading > table's data is performed by one backend. > It certainl

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-05-30 Thread Alexander Korotkov
Hi, Mark! On Tue, May 30, 2017 at 2:18 AM, Mark Rofail wrote: > rhaas=# select oid, * from pg_opfamily where opfmethod = 2742; >> oid | opfmethod |opfname | opfnamespace | opfowner >> --+---++--+-- >> 2745 | 2742 | array_ops |

Re: [HACKERS] Alter subscription..SET - NOTICE message is coming for table which is already removed

2017-05-30 Thread Masahiko Sawada
On Tue, May 30, 2017 at 10:12 AM, Masahiko Sawada wrote: > On Thu, May 25, 2017 at 8:15 PM, tushar wrote: >> On 05/25/2017 04:40 PM, Masahiko Sawada wrote: >>> >>> I think you did ALTER SUBSCRIPTION while table sync for 100 tables is >>> running, right? >> >> Yes, i didn't wait too much while exe

Re: [HACKERS] Adding support for Default partition in partitioning

2017-05-30 Thread Ashutosh Bapat
On Tue, May 30, 2017 at 1:08 PM, Jeevan Ladhe wrote: > Hi, > > I have rebased the patch on the latest commit. > PFA. > Thanks for rebasing the patch. Here are some review comments. +/* + * In case of default partition, just note the index, we do not +

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-05-30 Thread Mithun Cy
On Tue, May 30, 2017 at 12:36 PM, Konstantin Knizhnik wrote: > On 27.10.2016 14:39, Mithun Cy wrote: > And as far as I understand pg_autoprewarm has all necessary infrastructure > to do parallel load. We just need to spawn more than one background worker > and specify > separate block range for ea

Re: [HACKERS] Proposal : For Auto-Prewarm.

2017-05-30 Thread Mithun Cy
On Tue, May 30, 2017 at 10:16 AM, Mithun Cy wrote: > Thanks Robert, Sorry, there was one more mistake ( a typo) in dump_now() instead of using pfree I used free corrected same in the new patch v10. -- Thanks and Regards Mithun C Y EnterpriseDB: http://www.enterprisedb.com autoprewarm_10.patch

Re: [HACKERS] [COMMITTERS] Re: pgsql: Code review focused on new node types added by partitioning supp

2017-05-30 Thread Robert Haas
On Tue, May 30, 2017 at 5:26 AM, Magnus Hagander wrote: >> > I'm not really for doing it that way, but I'm willing to apply the fix >> > if there's consensus for your position. Anybody else have an opinion? >> >> I tend to agree with Noah on this one. > > +1 +1 from me, too. I don't see that th

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

2017-05-30 Thread Robert Haas
On Mon, May 29, 2017 at 9:34 PM, Noah Misch wrote: > This PostgreSQL 10 open item is past due for your status update. Kindly send > a status update within 24 hours, and include a date for your subsequent status > update. Refer to the policy on open item ownership: > https://www.postgresql.org/me

Re: [HACKERS] pg_resetwal is broken if run from v10 against older version of PG data directory

2017-05-30 Thread Robert Haas
On Tue, May 30, 2017 at 4:24 AM, Simon Riggs wrote: > Just check the name of the directory so that pg_resetwal will refuse > to run against pg_xlog directory That's a strictly weaker integrity check than what Tom already committed. That only distinguishes pre-10 from post-10, whereas Tom linked

Re: [HACKERS] Effect of changing the value for PARALLEL_TUPLE_QUEUE_SIZE

2017-05-30 Thread Robert Haas
On Tue, May 30, 2017 at 6:50 AM, Ashutosh Bapat wrote: > Increasing that number would require increased DSM which may not be > available. Also, I don't see any analysis as to why 6553600 is chosen? > Is it optimal? Does that work for all kinds of work loads? Picky, picky. The point is that Rafia

  1   2   >