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

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,

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.

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

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

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. >

[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

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

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

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

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: > > > >

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

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

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

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

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

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

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

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

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

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 >

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

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

[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

[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

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

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 > >

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

[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

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 ==

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

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

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

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/

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

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

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,

[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

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 >

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

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

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" >>

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. --

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

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

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). >>> >>>

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

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 -

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

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

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

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: [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

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

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

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

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

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 >

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

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

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

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

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

[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

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

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

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

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

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,

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

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. >

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

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

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

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 |

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 >>>

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

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 >

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:

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,

[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: >

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

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?

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

2017-05-30 Thread Jeevan Ladhe
Hi, I have fixed the issue related to default partition constraints not getting updated after detaching a partition. PFA. Regards, Jeevan Ladhe On Tue, May 30, 2017 at 1:08 PM, Jeevan Ladhe wrote: > Hi, > > I have rebased the patch on the latest commit. > PFA.

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

2017-05-30 Thread Christoph Berg
Re: Tom Lane 2017-05-29 <28291.1496087...@sss.pgh.pa.us> > Andres Freund writes: > > On May 29, 2017 12:15:37 PM PDT, Alvaro Herrera > > wrote: > >> I think it'd be smart to support the use case directly, because there's > >> interest in it being

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

2017-05-30 Thread Ashutosh Bapat
On Tue, May 30, 2017 at 5:28 AM, Rafia Sabih wrote: > Hello everybody, > > Here is a thing I observed in my recent experimentation, on changing > the value of PARALLEL_TUPLE_QUEUE_SIZE to 6553600, the performance of > a TPC-H query is improved by more than 50%. How

Re: [HACKERS] pgbench more operators & functions

2017-05-30 Thread Fabien COELHO
The patch looks ok, Ok. but the main issue is missing regress tests. Yes, I agree. I know so it is another patch. But it should be placed differently 1. first patch - initial infrastructure for pgbench regress tests 2. this patch + related regress tests Yep. I have no control about

[HACKERS] Effect of changing the value for PARALLEL_TUPLE_QUEUE_SIZE

2017-05-30 Thread Rafia Sabih
Hello everybody, Here is a thing I observed in my recent experimentation, on changing the value of PARALLEL_TUPLE_QUEUE_SIZE to 6553600, the performance of a TPC-H query is improved by more than 50%. Specifically, with this change, q12 completes in 14 seconds which was taking 45 seconds on head.

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

2017-05-30 Thread Magnus Hagander
On Tue, May 30, 2017 at 4:41 AM, Stephen Frost wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Noah Misch writes: > > > On Mon, May 29, 2017 at 03:20:41AM +, Tom Lane wrote: > > >> Annotate the fact that somebody added location fields to >

  1   2   >