Re: [HACKERS] RMT: Use Visual Studio 2015 for Compiling and linking the Windows version in PG10

2017-04-10 Thread Robert Haas
On Mon, Apr 10, 2017 at 11:21 AM, Hans Buschmann wrote: > On 03/28/2017 06:46 AM, I wrote in pgsql-general: >> I use Postgres on Windows 64 bit (8.1,10,WS2012R2,WS2016) for quite a >> while. >> I always install and upgrade from the ZIP binary distribution from >> enterpriseDB

Re: [HACKERS] GCC 7 warnings

2017-04-10 Thread Andres Freund
Hi, On 2017-04-10 11:03:23 -0400, Peter Eisentraut wrote: > The release of GCC 7 is approaching [0], and the number of warnings in > PostgreSQL has gone up since we last looked [1]. Output attached. (My > version is 7.0.1 20170408.) > > Most of the issues have to do with concatenating two or

[HACKERS] RMT: Use Visual Studio 2015 for Compiling and linking the Windows version in PG10

2017-04-10 Thread Hans Buschmann
On 03/28/2017 06:46 AM, I wrote in pgsql-general: > > I use Postgres on Windows 64 bit (8.1,10,WS2012R2,WS2016) for quite a while. > I always install and upgrade from the ZIP binary distribution from > enterpriseDB which works like a charm. > > In a recent fresh install I noticed that PostgreSQL

Re: [HACKERS] max_sync_workers_per_subscription is missing in postgresql.conf

2017-04-10 Thread Fujii Masao
On Mon, Apr 10, 2017 at 9:39 PM, Masahiko Sawada wrote: > On Mon, Apr 10, 2017 at 9:32 PM, Petr Jelinek > wrote: >> On 10/04/17 07:16, Masahiko Sawada wrote: >>> Hi all, >>> >>> Attached a patch for $subject. >>> >>> I added this parameter

Re: [HACKERS] tuple-routing and constraint violation error message, revisited

2017-04-10 Thread Robert Haas
On Mon, Apr 10, 2017 at 8:14 AM, Ashutosh Bapat wrote: > On Fri, Mar 31, 2017 at 7:43 AM, Amit Langote > wrote: >> Summary is: We decided in f1b4c771ea7 [1] that passing the original slot >> (one containing the tuple formatted per

Re: [HACKERS] GSOC'17 project introduction: Parallel COPY execution with errors handling

2017-04-10 Thread Robert Haas
On Mon, Apr 10, 2017 at 11:39 AM, Alex K wrote: > (1) It seems that starting new subtransaction at step 4 is not necessary. We > can just gather all error lines in one pass and at the end of input start > the only one additional subtransaction with all safe-lines at

Re: [HACKERS] GCC 7 warnings

2017-04-10 Thread Aleksander Alekseev
Hi Peter, > c) Expand the target buffer sizes until the warning goes away. (Sample > patch attached.) I personally think it's a great patch. Unfortunately I don't have GCC 7.0 right now but at least it doesn't break anything on 6.3.1. Since there is no rush I would suggest to add an entry to

Re: [HACKERS] pg_upgrade vs extension upgrades

2017-04-10 Thread Robert Haas
On Mon, Apr 10, 2017 at 11:30 AM, Magnus Hagander wrote: > After you've run pg_upgrade, you have to loop through all your databases and > do an "ALTER EXTENSION abc UPDATE" once for each extension. > > Is there a reason we shouldn't have pg_upgrade emit a script that does

[HACKERS] tablesync patch broke the assumption that logical rep depends on?

2017-04-10 Thread Fujii Masao
Hi, src/backend/replication/logical/launcher.c * Worker started and attached to our shmem. This check is safe * because only launcher ever starts the workers, so nobody can steal * the worker slot. The tablesync patch enabled even worker to start another

Re: [HACKERS] Merge join for GiST

2017-04-10 Thread Robert Haas
On Mon, Apr 10, 2017 at 7:53 AM, Andrew Borodin wrote: > I think this idea is somewhat related to this patch [2], but as for > now cannot describe how exactly GiST merge and Range Merge features > relate. It also seems somewhat related to Peter Moser's work on ALIGN and

Adding lfirst_node (was Re: [HACKERS] [sqlsmith] Planner crash on foreign table join)

2017-04-10 Thread Tom Lane
I wrote: > Andrew Gierth writes: >> In a discussion with Andres on the hash grouping sets review thread, I >> proposed that we should have something of the form >> #define lfirst_node(_type_, l) (castNode(_type_,lfirst(l))) > That seems like a fairly good idea. A

Re: [HACKERS] logical replication worker and statistics

2017-04-10 Thread Peter Eisentraut
On 4/9/17 22:20, Noah Misch wrote: > The above-described topic is currently a PostgreSQL 10 open item. Peter, > since you committed the patch believed to have created it, you own this open > item. If some other commit is more relevant or if this does not belong as a > v10 open item, please let

Re: [HACKERS] Compiler warning in costsize.c

2017-04-10 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > I wonder if we shouldn't just do > > RangeTblEntry *rte PG_USED_FOR_ASSERTS_ONLY; > ListCell *lc; > > /* Should only be applied to base relations that are subqueries */ > Assert(rel->relid > 0); > -#ifdef USE_ASSERT_CHECKING >

[HACKERS] pg_upgrade vs extension upgrades

2017-04-10 Thread Magnus Hagander
After you've run pg_upgrade, you have to loop through all your databases and do an "ALTER EXTENSION abc UPDATE" once for each extension. Is there a reason we shouldn't have pg_upgrade emit a script that does this, similar to how it emits a script to run ANALYZE? -- Magnus Hagander Me:

Re: [HACKERS] Compiler warning in costsize.c

2017-04-10 Thread Robert Haas
On Mon, Apr 10, 2017 at 8:30 AM, Michael Paquier wrote: > On Mon, Apr 10, 2017 at 9:05 PM, Tom Lane wrote: >> I wonder if we shouldn't just do >> >> RangeTblEntry *rte PG_USED_FOR_ASSERTS_ONLY; >> ListCell *lc; >> >> /*

Re: [HACKERS] GCC 7 warnings

2017-04-10 Thread Andres Freund
On 2017-04-10 09:10:07 -0700, Andres Freund wrote: > Hi, > > On 2017-04-10 11:03:23 -0400, Peter Eisentraut wrote: > > The release of GCC 7 is approaching [0], and the number of warnings in > > PostgreSQL has gone up since we last looked [1]. Output attached. (My > > version is 7.0.1 20170408.)

Re: Adding lfirst_node (was Re: [HACKERS] [sqlsmith] Planner crash on foreign table join)

2017-04-10 Thread Andres Freund
On 2017-04-10 12:20:16 -0400, Tom Lane wrote: > Barring objections, I'll push this shortly. +1, to just about all of it -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] src/interfaces/libpq shipping nmake-related Makefiles

2017-04-10 Thread Tom Lane
Magnus Hagander writes: Are these votes for getting rid of both win32.mak and bcc32.mak? > PFA a patch that does this. Did I miss something? :) Perhaps we should get rid of the WIN32_ONLY_COMPILER symbol altogether; given this patch, "#ifdef WIN32_ONLY_COMPILER" could

Re: [HACKERS] logical replication and SIGHUP

2017-04-10 Thread Peter Eisentraut
On 4/9/17 23:20, Michael Paquier wrote: > After more review, I think that got_SIGTERM should be of type volatile > sig_atomic_t in launcher.c or that's not signal-safe. I think as well > that for correctness errno should be saved as SetLatch() is called and > restored afterwards. Please find

Re: [HACKERS] recent deadlock regression test failures

2017-04-10 Thread Kevin Grittner
On Mon, Apr 10, 2017 at 9:28 AM, Tom Lane wrote: > Thomas Munro writes: >> Here's a pair of draft patches for review: Thanks. > Pushed with cosmetic improvements. Thanks. > I notice that the safe-snapshot code path is not paying attention to

Re: [HACKERS] GSOC'17 project introduction: Parallel COPY execution with errors handling

2017-04-10 Thread Alex K
Hi Alexander! I've missed your reply, since proposal submission deadline have passed last Monday and I didn't check hackers mailing list too frequently. (1) It seems that starting new subtransaction at step 4 is not necessary. We can just gather all error lines in one pass and at the end of

[HACKERS] Repetitive code in RI triggers

2017-04-10 Thread Ildar Musin
Hi all, I was looking through the RI triggers code recently and noticed a few almost identical functions, e.g. ri_restrict_upd() and ri_restrict_del(). The following patch is an attempt to reduce some of repetitive code. Yet there is still room for improvement. Thanks, -- Ildar Musin

Re: [HACKERS] GCC 7 warnings

2017-04-10 Thread Tom Lane
Peter Eisentraut writes: > Possible fixes: > a) Ignore, hoping GCC will change before final release. (unlikely at > this point) > b) Add compiler option to disable this particular warning, worry about > it later. (Might be an option for backpatching.) > c)

Re: [HACKERS] logical replication worker and statistics

2017-04-10 Thread Peter Eisentraut
On 4/10/17 05:49, Stas Kelvich wrote: > Here is small patch to call statistics in logical worker. Originally i > thought that stat > collection during logical replication should manually account amounts of > changed tuples, > but seems that it is already smoothly handled on relation level. So

Re: [HACKERS] logical replication worker and statistics

2017-04-10 Thread Stas Kelvich
> On 10 Apr 2017, at 19:50, Peter Eisentraut > wrote: > > On 4/10/17 05:49, Stas Kelvich wrote: >> Here is small patch to call statistics in logical worker. Originally i >> thought that stat >> collection during logical replication should manually account

Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

2017-04-10 Thread Robert Haas
On Sun, Apr 9, 2017 at 10:10 PM, Tom Lane wrote: > While I admit that I've not been paying close attention to the whole > table partitioning business, I wonder whether we have any clearly written > down specification about (a) how much partition member tables are allowed > to

Re: [HACKERS] pg_upgrade vs extension upgrades

2017-04-10 Thread Tom Lane
Magnus Hagander writes: > After you've run pg_upgrade, you have to loop through all your databases > and do an "ALTER EXTENSION abc UPDATE" once for each extension. > Is there a reason we shouldn't have pg_upgrade emit a script that does > this, similar to how it emits a

Re: [HACKERS] strange parallel query behavior after OOM crashes

2017-04-10 Thread Neha Khatri
On Tue, Apr 11, 2017 at 1:16 AM, Robert Haas wrote: > > 1. Forget BGW_NEVER_RESTART workers in > ResetBackgroundWorkerCrashTimes() rather than leaving them around to > be cleaned up after the conclusion of the restart, so that they go > away before rather than after shared

Re: [HACKERS] Some thoughts about SCRAM implementation

2017-04-10 Thread Andres Freund
On 2017-04-10 20:28:27 +0200, Álvaro Hernández Tortosa wrote: > > > On 10/04/17 13:02, Heikki Linnakangas wrote: > > On 04/10/2017 12:39 PM, Álvaro Hernández Tortosa wrote: > > > - I think channel binding support should be added. SCRAM brings security > > > improvements over md5 and other

Re: [HACKERS] Compiler warning in costsize.c

2017-04-10 Thread Robert Haas
On Mon, Apr 10, 2017 at 2:09 PM, Tom Lane wrote: > ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: >> Why bother with the 'rte' variable at all if it's only used for the >> Assert()ing the rtekind? > > That was proposed a few messages back. I don't like

Re: [HACKERS] recent deadlock regression test failures

2017-04-10 Thread Tom Lane
Thomas Munro writes: > On Tue, Apr 11, 2017 at 6:17 AM, Tom Lane wrote: >> Maybe it's impossible for a parallel worker to acquire its own >> snapshot at all, in which case this is moot. But I'm nervous. > Parallel workers can't acquire

Re: [HACKERS] "left shift of negative value" warnings

2017-04-10 Thread Andres Freund
On 2017-04-09 19:20:27 -0400, Tom Lane wrote: > Andres Freund writes: > > For a while I've been getting warnings like > > /home/andres/src/postgresql/src/backend/utils/adt/inet_cidr_ntop.c: In > > function ‘inet_cidr_ntop_ipv6’: > >

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-10 Thread Pavel Stehule
2017-04-10 13:07 GMT+02:00 Greg Stark : > On 2 April 2017 at 07:53, Fabien COELHO wrote: > > Note that this is already available indirectly, as show in the > > documentation. > > > > SELECT some-boolean-expression AS okay \gset > > \if :okay > > \echo

Re: [HACKERS] Letting the client choose the protocol to use during a SASL exchange

2017-04-10 Thread Álvaro Hernández Tortosa
On 10/04/17 14:57, Heikki Linnakangas wrote: On 04/07/2017 01:13 AM, Michael Paquier wrote: On Fri, Apr 7, 2017 at 5:15 AM, Álvaro Hernández Tortosa wrote: I don't see it. The message AuthenticationSASL.String could contain a CSV of the SCRAM protocols supported. This

Re: [HACKERS] recent deadlock regression test failures

2017-04-10 Thread Thomas Munro
On Tue, Apr 11, 2017 at 6:17 AM, Tom Lane wrote: > Kevin Grittner writes: >> On Mon, Apr 10, 2017 at 9:28 AM, Tom Lane wrote: >>> I notice that the safe-snapshot code path is not paying attention to >>> parallel-query cases, unlike the

Re: [HACKERS] Letting the client choose the protocol to use during a SASL exchange

2017-04-10 Thread Heikki Linnakangas
On 04/10/2017 09:33 PM, Álvaro Hernández Tortosa wrote: Thanks for posting the patched HTML. In my opinion, all looks good except that: - I will add an extra String (a CSV) to AuthenticationSASL message for channel binding names, so that message format can remain without changes when

Re: [HACKERS] strange parallel query behavior after OOM crashes

2017-04-10 Thread Robert Haas
On Mon, Apr 10, 2017 at 2:32 PM, Neha Khatri wrote: > On Tue, Apr 11, 2017 at 1:16 AM, Robert Haas wrote: >> 1. Forget BGW_NEVER_RESTART workers in >> ResetBackgroundWorkerCrashTimes() rather than leaving them around to >> be cleaned up after the

Re: [HACKERS] "left shift of negative value" warnings

2017-04-10 Thread Tom Lane
Andres Freund writes: > On 2017-04-09 19:20:27 -0400, Tom Lane wrote: >> As I read that, it's only "undefined" if overflow would occur (ie >> the sign bit would change). Your compiler is being a useless annoying >> nanny, but that seems to be the in thing for compiler authors

Re: [HACKERS] Letting the client choose the protocol to use during a SASL exchange

2017-04-10 Thread Álvaro Hernández Tortosa
On 10/04/17 21:41, Heikki Linnakangas wrote: On 04/10/2017 09:33 PM, Álvaro Hernández Tortosa wrote: Thanks for posting the patched HTML. In my opinion, all looks good except that: - I will add an extra String (a CSV) to AuthenticationSASL message for channel binding names, so that

Re: [HACKERS] Some thoughts about SCRAM implementation

2017-04-10 Thread Robert Haas
On Mon, Apr 10, 2017 at 2:32 PM, Andres Freund wrote: > That can equally be said about about a lot of features. If we don't > stop at some point... Also, we're not late in the CF cycle, the CF cycle > for v10 is over. It's not like the non-existance of channel binding >

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-10 Thread Peter Eisentraut
OK, we need to come to a conclusion here. To summarize: Problem 1: pg_subscription.subconninfo can only be read by superuser. So non-superusers cannot dump subscriptions. Precedent is pg_user_mapping. In that case, we just omit the user-mapping options if we're not a superuser. Pretty

Re: [HACKERS] recent deadlock regression test failures

2017-04-10 Thread Tom Lane
Kevin Grittner writes: > On Mon, Apr 10, 2017 at 9:28 AM, Tom Lane wrote: >> I notice that the safe-snapshot code path is not paying attention to >> parallel-query cases, unlike the lock code path. I'm not sure how >> big a deal that is... > Parallel

Re: [HACKERS] Some thoughts about SCRAM implementation

2017-04-10 Thread Álvaro Hernández Tortosa
On 10/04/17 13:02, Heikki Linnakangas wrote: On 04/10/2017 12:39 PM, Álvaro Hernández Tortosa wrote: - I think channel binding support should be added. SCRAM brings security improvements over md5 and other simpler digest algorithms. But where it really shines is together with channel binding.

Re: [HACKERS] GSOC'17 project introduction: Parallel COPY execution with errors handling

2017-04-10 Thread Alexey Kondratov
Yes, sure, I don't doubt it. The question was around step 4 in the following possible algorithm: 1. Suppose we have to insert N records 2. Start subtransaction with these N records 3. Error is raised on k-th line 4. Then, we know that we can safely insert all lines from the 1st till (k - 1) 5.

Re: [HACKERS] valgrind errors around dsa.c

2017-04-10 Thread Andres Freund
On 2017-04-08 14:46:04 +1200, Thomas Munro wrote: > Fix attached. Thanks. Pushed! Andres -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Compiler warning in costsize.c

2017-04-10 Thread Tom Lane
Robert Haas writes: > On Mon, Apr 10, 2017 at 8:30 AM, Michael Paquier > wrote: >> On Mon, Apr 10, 2017 at 9:05 PM, Tom Lane wrote: >>> I wonder if we shouldn't just do >>> ... >>> and eat the "useless" calculation of rte. >

Re: [HACKERS] recent deadlock regression test failures

2017-04-10 Thread Kevin Grittner
On Mon, Apr 10, 2017 at 1:17 PM, Tom Lane wrote: > Kevin Grittner writes: >> On Mon, Apr 10, 2017 at 9:28 AM, Tom Lane wrote: >>> I notice that the safe-snapshot code path is not paying attention to >>> parallel-query cases, unlike the

Re: [HACKERS] Somebody has not thought through subscription locking considerations

2017-04-10 Thread Peter Eisentraut
On 3/31/17 20:25, Petr Jelinek wrote: > On 01/04/17 01:57, Petr Jelinek wrote: >> That being said, looking at use-cases for SetSubscriptionRelState that's >> basically CREATE SUBSCRIPTION, ALTER SUBSCRIPTION REFRESH and tablesync >> worker. So the DDL thing applies to first ones as well and

Re: [HACKERS] "left shift of negative value" warnings

2017-04-10 Thread Andres Freund
On 2017-04-10 15:25:57 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-04-09 19:20:27 -0400, Tom Lane wrote: > >> As I read that, it's only "undefined" if overflow would occur (ie > >> the sign bit would change). Your compiler is being a useless annoying > >>

Re: [HACKERS] Compiler warning in costsize.c

2017-04-10 Thread Tom Lane
ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > Why bother with the 'rte' variable at all if it's only used for the > Assert()ing the rtekind? That was proposed a few messages back. I don't like it because it makes these functions look different from the other

Re: [HACKERS] "left shift of negative value" warnings

2017-04-10 Thread Markus Nullmeier
On 10/04/17 22:19, Andres Freund wrote: > I guess the motivation is that it's not entirely clear what happens with > the sign bit, when shifting. Indeed, certain one's complement CPUs even "outlived" C99 by a small margin, as it were:

Re: [HACKERS] [sqlsmith] ERROR: badly formatted node string "RESTRICTINFO...

2017-04-10 Thread Tom Lane
I wrote: > Apparently, postgres_fdw is trying to store RestrictInfos in the > fdw_private field of a ForeignScan node. That won't do; those aren't > supposed to be present in a finished plan tree, so there's no readfuncs.c > support for them (and we're not adding it). > Don't know if this is a

Re: [HACKERS] pg_stats_ext view does not seem all that useful

2017-04-10 Thread Tomas Vondra
On 04/10/2017 12:12 PM, David Rowley wrote: During my review and time spent working on the functional dependencies part of extended statistics I wondered what was the use for the pg_stats_ext view. I was unsure why the length of the serialised dependencies was useful. Perhaps we could improve

Re: [HACKERS] [sqlsmith] ERROR: badly formatted node string "RESTRICTINFO...

2017-04-10 Thread Tom Lane
I wrote: > (BTW, I've not yet looked to see if this needs to be back-ported.) postgres_fdw will definitely include RestrictInfos in its fdw_private list in 9.6. However, I've been unable to provoke a visible failure. After some rooting around, the reason seems to be that: 1. postgres_fdw

Re: [HACKERS] WAL logging problem in 9.4.3?

2017-04-10 Thread Kyotaro HORIGUCHI
Hello, thank you for looking this. At Fri, 07 Apr 2017 20:38:35 -0400, Tom Lane wrote in <27309.1491611...@sss.pgh.pa.us> > Alvaro Herrera writes: > > Interesting. I wonder if it's possible that a relcache invalidation > > would cause these values

[HACKERS] Ongoing issues with representation of empty arrays

2017-04-10 Thread Andrew Gierth
The distinction between the standard representation of '{}' as an array with zero dimensions and nonstandard representations as a 1-dimensional array with zero elements has come up in a couple of contexts on the IRC channel recently. First is contrib/intarray, _AGAIN_ (see past bugs such as

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-04-10 Thread Andres Freund
Hi, On 2017-04-08 23:36:13 +0530, Pavan Deolasee wrote: > On Wed, Apr 5, 2017 at 11:57 PM, Andres Freund wrote: > > > On 2017-04-05 09:36:47 -0400, Robert Haas wrote: > > > By the way, the "Converting WARM chains back to HOT chains" section of > > > README.WARM seems to be

Re: [HACKERS] ExecPrepareExprList and per-query context

2017-04-10 Thread Amit Langote
On 2017/04/08 1:49, Tom Lane wrote: > Amit Langote writes: >> Should ExecPrepareExprList also switch to estate->es_query_cxt? > > Good point; I'm surprised we haven't noted any failures from that. > We surely want the entire result data structure to be in the same

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-10 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > Problem 1: pg_subscription.subconninfo can only be read by superuser. > So non-superusers cannot dump subscriptions. I'm not particularly happy with this. > Precedent is pg_user_mapping. In that case, we just omit the >

Re: [HACKERS] SUBSCRIPTIONS and pg_upgrade

2017-04-10 Thread Peter Eisentraut
On 4/10/17 20:55, Stephen Frost wrote: > Peter, > > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: >> Problem 1: pg_subscription.subconninfo can only be read by superuser. >> So non-superusers cannot dump subscriptions. > > I'm not particularly happy with this. Why? How?

Re: [HACKERS] Repetitive code in RI triggers

2017-04-10 Thread Peter Eisentraut
On 4/10/17 11:55, Ildar Musin wrote: > I was looking through the RI triggers code recently and noticed a few > almost identical functions, e.g. ri_restrict_upd() and > ri_restrict_del(). The following patch is an attempt to reduce some of > repetitive code. That looks like something worth

Re: [HACKERS] SCRAM authentication, take three

2017-04-10 Thread Peter Eisentraut
On 4/10/17 04:27, Heikki Linnakangas wrote: > One thing to consider is that we just made the decision that "md5" > actually means "md5 or scram-sha-256". Extrapolating from that, I think > we'll want "scram-sha-256" to mean "scram-sha-256 or scram-sha-256-plus" > (i.e. the channel-bonding

Re: [HACKERS] pg_stats_ext view does not seem all that useful

2017-04-10 Thread Alvaro Herrera
Tomas Vondra wrote: > On 04/10/2017 12:12 PM, David Rowley wrote: > > During my review and time spent working on the functional dependencies > > part of extended statistics I wondered what was the use for the > > pg_stats_ext view. I was unsure why the length of the serialised > > dependencies was

Re: [HACKERS] Compiler warning in costsize.c

2017-04-10 Thread Michael Paquier
On Tue, Apr 11, 2017 at 4:02 AM, Robert Haas wrote: > On Mon, Apr 10, 2017 at 2:09 PM, Tom Lane wrote: >> ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: >>> Why bother with the 'rte' variable at all if it's only used for the >>>

Re: [HACKERS] SCRAM authentication, take three

2017-04-10 Thread Peter Eisentraut
On 4/9/17 19:19, Noah Misch wrote: > These are the two chief approaches I'm seeing: > > 1. scram-sha-256, scram-sha-256-plus, and successors will be their own >pg_hba.conf authentication methods. Until and unless someone implements an >ability to name multiple methods per HBA line, you

Re: [HACKERS] Ongoing issues with representation of empty arrays

2017-04-10 Thread David G. Johnston
On Mon, Apr 10, 2017 at 5:57 PM, Andrew Gierth wrote: > Second is aclitem[], past bug #8395 which was not really resolved; empty > ACLs are actually 1-dim arrays of length 0, and all the ACL functions > insist on that, which means that you can't call aclexplode('{}')

Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.

2017-04-10 Thread Michael Paquier
On Mon, Apr 10, 2017 at 5:47 PM, Magnus Hagander wrote: > Based on that we seem to agree here, should we add this as an open item? > Clearly if we want to change this, we should do so before 10. This really is a new feature, so as the focus is to stabilize things I think

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

2017-04-10 Thread Ashutosh Bapat
On Thu, Apr 6, 2017 at 6:37 AM, Robert Haas wrote: > On Wed, Apr 5, 2017 at 2:42 AM, Ashutosh Bapat > wrote: >> Only inner join conditions have equivalence classes associated with >> those. Outer join conditions create single element

Re: [HACKERS] Compiler warning in costsize.c

2017-04-10 Thread David Rowley
On 8 April 2017 at 04:42, Tom Lane wrote: > I'd be happier with something along the line of > > RangeTblEntry *rte; > ListCell *lc; > > /* Should only be applied to base relations that are subqueries */ > Assert(rel->relid > 0); > rte

[HACKERS] Should pg_current_wal_location() become pg_current_wal_lsn()

2017-04-10 Thread David Rowley
... and of course the other functions matching *wal*location* My thoughts here are that we're already breaking backward compatibility of these functions for PG10, so thought we might want to use this as an opportunity to fix the naming a bit more. I feel that the "location" word not the best

Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.

2017-04-10 Thread Magnus Hagander
On Wed, Apr 5, 2017 at 6:22 PM, Robert Haas wrote: > On Thu, Mar 23, 2017 at 4:50 AM, Magnus Hagander > wrote: > > One thing we might want to consider around this -- in 10 we have > > target_session_attrs=read-write (since > >

[HACKERS] Allowing extended stats on foreign and partitioned tables

2017-04-10 Thread David Rowley
While reviewing extended stats I noticed that it was possible to create extended stats on many object types, including sequences. I mentioned that this should be disallowed. Statistics were then changed to be only allowed on plain tables and materialized views. This should be relaxed again to

Re: [HACKERS] Implementation of SASLprep for SCRAM-SHA-256

2017-04-10 Thread Heikki Linnakangas
On 04/06/2017 07:59 PM, Heikki Linnakangas wrote: Another thing I'd like some more eyes on, is how this will work with encodings other than UTF-8. We will now try to normalize the password as if it was in UTF-8, even if it isn't. That's OK as long as we're consistent about it, but there is one

Re: [HACKERS] SCRAM authentication, take three

2017-04-10 Thread Heikki Linnakangas
On 04/10/2017 02:19 AM, Noah Misch wrote: On Fri, Apr 07, 2017 at 10:28:59AM +0300, Heikki Linnakangas wrote: On 04/07/2017 08:21 AM, Noah Misch wrote: Michael shared[1] better pg_hba.conf syntax on 2016-11-05. I agreed[2] with his framing of the problem and provided two syntax alternatives,

[HACKERS] Some thoughts about SCRAM implementation

2017-04-10 Thread Álvaro Hernández Tortosa
Hi! There's some ongoing discussion about SCRAM (like this thread https://www.postgresql.org/message-id/243d8c11-6149-a4bb-0909-136992f74b23%40iki.fi) but I wanted to open a new thread that covers these topics and other, more general ones. Here are some thoughts based on my

[HACKERS] Some thoughts about SCRAM implementation

2017-04-10 Thread Álvaro Hernández Tortosa
Hi! There's some ongoing discussion about SCRAM (like this thread https://www.postgresql.org/message-id/243d8c11-6149-a4bb-0909-136992f74b23%40iki.fi) but I wanted to open a new thread that covers these topics and other, more general ones. Here are some thoughts based on my

Re: [HACKERS] Allowing extended stats on foreign and partitioned tables

2017-04-10 Thread Ashutosh Bapat
This isn't exactly about this particular thread. But I noticed, that after we introduced RELKIND_PARTITIONED_TABLE, we required to change a number of conditions to include this relkind. We missed some places in initial commits and fixed those later. I am wondering whether we should creates macros

[HACKERS] Vacuum full stats reporting

2017-04-10 Thread Magnus Hagander
Right now, VACUUM FULL are not reported in pgstat. That seems bad:ish. I can see two reasonable ways to proceed: 1. Start reporting VACUUM FULL as regular vacuums, so they count up vacuum_count and last_vacuum in pg_stat_*_tables. 2. Create a new set of counters for CLUSTER and VACUUM FULL

Re: [HACKERS] Interval for launching the table sync worker

2017-04-10 Thread Masahiko Sawada
On Sun, Apr 9, 2017 at 6:25 PM, Masahiko Sawada wrote: > On Sat, Apr 8, 2017 at 8:13 AM, Peter Eisentraut > wrote: >> On 4/7/17 01:10, Masahiko Sawada wrote: >>> It's not critical but it could be problem. So I thought we should fix >>> it

[HACKERS] pg_stats_ext view does not seem all that useful

2017-04-10 Thread David Rowley
During my review and time spent working on the functional dependencies part of extended statistics I wondered what was the use for the pg_stats_ext view. I was unsure why the length of the serialised dependencies was useful. Perhaps we could improve the view, but I'm not all that sure what value

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-04-10 Thread Greg Stark
On 4 April 2017 at 17:10, Maksim Milyutin wrote: > > 3. As I noticed early pg_depend table is used for cascade deleting indexes > on partitioned table and its children. I also use pg_depend to determine > relationship between parent and child indexes when reindex

Re: [pgsql-www] [HACKERS] Small issue in online devel documentation build

2017-04-10 Thread Magnus Hagander
On Mon, Apr 10, 2017 at 4:02 AM, Bruce Momjian wrote: > On Sun, Apr 9, 2017 at 07:00:38PM +0200, Magnus Hagander wrote: > > > > > > On Sun, Apr 9, 2017 at 2:32 AM, Bruce Momjian wrote: > > > > On Sat, Apr 8, 2017 at 12:50:19PM -0400, Robert Haas wrote:

Re: [HACKERS] src/interfaces/libpq shipping nmake-related Makefiles

2017-04-10 Thread Magnus Hagander
On Fri, Apr 7, 2017 at 4:03 PM, Andrew Dunstan < andrew.duns...@2ndquadrant.com> wrote: > > > On 04/07/2017 09:58 AM, Tom Lane wrote: > >> This seems be the same as the 2nd error that was reported back in 2013: > >> https://www.postgresql.org/message-id/CAJ2%3DPVQcW8UGNnSy%3DOw% >

Re: [HACKERS] Some thoughts about SCRAM implementation

2017-04-10 Thread Heikki Linnakangas
On 04/10/2017 12:39 PM, Álvaro Hernández Tortosa wrote: - I think channel binding support should be added. SCRAM brings security improvements over md5 and other simpler digest algorithms. But where it really shines is together with channel binding. This is the only method to prevent MITM

Re: [HACKERS] [sqlsmith] Planner crash on foreign table join

2017-04-10 Thread Tom Lane
Andrew Gierth writes: > In the discussion with Andres the same point came up for palloc, for > which I suggested we add something along the lines of: > #define palloc_object(_type_) (_type_ *) palloc(sizeof(_type_)) > #define palloc_array(_type_, n) (_type_ *)

Re: [HACKERS] src/interfaces/libpq shipping nmake-related Makefiles

2017-04-10 Thread Michael Paquier
On Mon, Apr 10, 2017 at 8:35 PM, Tom Lane wrote: > Magnus Hagander writes: >> Are these votes for getting rid of both win32.mak and bcc32.mak? > > I'm for it. +1. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] Compiler warning in costsize.c

2017-04-10 Thread Michael Paquier
On Mon, Apr 10, 2017 at 9:05 PM, Tom Lane wrote: > I wonder if we shouldn't just do > > RangeTblEntry *rte PG_USED_FOR_ASSERTS_ONLY; > ListCell *lc; > > /* Should only be applied to base relations that are subqueries */ > Assert(rel->relid >

Re: [HACKERS] max_sync_workers_per_subscription is missing in postgresql.conf

2017-04-10 Thread Petr Jelinek
On 10/04/17 07:16, Masahiko Sawada wrote: > Hi all, > > Attached a patch for $subject. > > I added this parameter into "Asynchronous Behavior" section of > "RESOURCE" section. But GUC parameter for subscriber now is written in > this section, in spite of there is "REPLICATION" section. I think

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-04-10 Thread Greg Stark
On 2 April 2017 at 07:53, Fabien COELHO wrote: > Note that this is already available indirectly, as show in the > documentation. > > SELECT some-boolean-expression AS okay \gset > \if :okay > \echo boolean expression was true > \else > \echo boolean expression

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-04-10 Thread Robert Haas
On Tue, Apr 4, 2017 at 12:10 PM, Maksim Milyutin wrote: > 1. I have added a new relkind for local indexes named RELKIND_LOCAL_INDEX > (literal 'l'). Seems like it should maybe be RELKIND_PARTITIONED_INDEX. There's nothing particularly "local" about it. I suppose what

Re: [HACKERS] strange parallel query behavior after OOM crashes

2017-04-10 Thread Kuntal Ghosh
On Thu, Apr 6, 2017 at 6:50 AM, Robert Haas wrote: > On Wed, Apr 5, 2017 at 8:17 PM, Neha Khatri wrote: >> The problem here seem to be the change in the max_parallel_workers value >> while the parallel workers are still under execution. So this poses

Re: [HACKERS] tuple-routing and constraint violation error message, revisited

2017-04-10 Thread Ashutosh Bapat
On Fri, Mar 31, 2017 at 7:43 AM, Amit Langote wrote: > Hi, > > Last message regarding this was by Robert on the original partitioning thread: > > https://www.postgresql.org/message-id/CA%2BTgmoZjGzSM5WwnyapFaw3GxnDLWh7pm8Xiz8_QWQnUQy%3DSCA%40mail.gmail.com > >

Re: [HACKERS] logical replication and SIGHUP

2017-04-10 Thread Petr Jelinek
On 10/04/17 05:20, Michael Paquier wrote: > On Mon, Apr 10, 2017 at 11:41 AM, Noah Misch wrote: >> On Thu, Apr 06, 2017 at 02:21:29AM +0900, Fujii Masao wrote: >>> Both launcher and worker don't handle SIGHUP signal and cannot >>> reload the configuration. I think that this is

Re: [HACKERS] src/interfaces/libpq shipping nmake-related Makefiles

2017-04-10 Thread Tom Lane
Magnus Hagander writes: > Are these votes for getting rid of both win32.mak and bcc32.mak? I'm for it. > If so, count me in for the same :) Want me to do the honors, as it's my > fault they're in there in the first place? Sure. regards, tom lane

Re: [HACKERS] logical replication and SIGHUP

2017-04-10 Thread Tom Lane
Petr Jelinek writes: > Looks good to me. Just as a note, we'll have to handle this newly > supported config rereads in the async commit patch where we override > synchronous_commit GUC, but the config reread will change it back. Umm ... you're doing what? There are

Re: [HACKERS] max_sync_workers_per_subscription is missing in postgresql.conf

2017-04-10 Thread Masahiko Sawada
On Mon, Apr 10, 2017 at 9:32 PM, Petr Jelinek wrote: > On 10/04/17 07:16, Masahiko Sawada wrote: >> Hi all, >> >> Attached a patch for $subject. >> >> I added this parameter into "Asynchronous Behavior" section of >> "RESOURCE" section. But GUC parameter for

Re: [HACKERS] Proposal: Local indexes for partitioned table

2017-04-10 Thread Maksim Milyutin
On 10.04.2017 13:46, Greg Stark wrote: On 4 April 2017 at 17:10, Maksim Milyutin wrote: 3. As I noticed early pg_depend table is used for cascade deleting indexes on partitioned table and its children. I also use pg_depend to determine relationship between parent

[HACKERS] Merge join for GiST

2017-04-10 Thread Andrew Borodin
Hello, hackers! ==Spatial joins== Scientific papers from the dawn of R-trees and multidimensional indexes feature a lot of algorithms for spatial joins. I.e. you have two sets of geometries s1 and s2, you need to produce all colliding pairs (p1,p2) where p1 in s1 and p2 in s2. For 2 R-trees of

Re: [HACKERS] Compiler warning in costsize.c

2017-04-10 Thread Tom Lane
David Rowley writes: > On 8 April 2017 at 04:42, Tom Lane wrote: >> BTW, is it really true that only these two places produce such warnings >> on MSVC? I see about three dozen uses of PG_USED_FOR_ASSERTS_ONLY in our >> tree, and I'd have

Re: [HACKERS] Interval for launching the table sync worker

2017-04-10 Thread Petr Jelinek
On 10/04/17 11:02, Masahiko Sawada wrote: > On Sun, Apr 9, 2017 at 6:25 PM, Masahiko Sawada wrote: >> On Sat, Apr 8, 2017 at 8:13 AM, Peter Eisentraut >> wrote: >>> On 4/7/17 01:10, Masahiko Sawada wrote: It's not critical but it

  1   2   >