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

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

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

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] 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] 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] 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: [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] 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] logical replication worker and statistics

2017-04-10 Thread Stas Kelvich
> On 10 Apr 2017, at 05:20, Noah Misch wrote: > > On Wed, Apr 05, 2017 at 05:02:18PM +0300, Stas Kelvich wrote: >>> On 27 Mar 2017, at 18:59, Robert Haas wrote: >>> On Mon, Mar 27, 2017 at 11:14 AM, Fujii Masao wrote:

[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

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

Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers

2017-04-10 Thread Aleksander Alekseev
Hi Yorick, > should do so on any standby servers first, before applying the changes to What you actually meant probably was "do so on ALL standby servers first", right? -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

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

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

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

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

<    1   2