Re: [HACKERS] Parallel Append implementation

2017-09-15 Thread Amit Kapila
On Thu, Sep 14, 2017 at 9:41 PM, Robert Haas wrote: > On Mon, Sep 11, 2017 at 9:25 AM, Amit Kapila wrote: >> I think the patch stores only non-partial paths in decreasing order, >> what if partial paths having more costs follows those paths? > >

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-15 Thread Bruce Momjian
On Thu, Sep 14, 2017 at 09:21:25PM -0400, Stephen Frost wrote: > Michael, all, > > * Michael Paquier (michael.paqu...@gmail.com) wrote: > > On Fri, Sep 15, 2017 at 8:23 AM, Andreas Joseph Krogh > > wrote: > > > I tested upgrading from 9.6 to 10 now, using pg_upgrade, and

Re: [HACKERS] Re: [COMMITTERS] pgsql: Use MINVALUE/MAXVALUE instead of UNBOUNDED for range partition b

2017-09-15 Thread Robert Haas
On Thu, Sep 14, 2017 at 12:59 PM, David G. Johnston wrote: > I think we are being consistent as a project by enforcing strictness of > input in this situation so I'll toss my +0.5/+1 here as well. All right, since all three new votes are going the same direction with

Re: [HACKERS] Should we cacheline align PGXACT?

2017-09-15 Thread Alexander Korotkov
On Tue, Sep 5, 2017 at 2:47 PM, Daniel Gustafsson wrote: > > On 04 Apr 2017, at 14:58, David Steele wrote: > > > > On 4/4/17 8:55 AM, Alexander Korotkov wrote: > >> On Mon, Apr 3, 2017 at 9:58 PM, Andres Freund >> > >>I'm inclined

Re: [HACKERS] path toward faster partition pruning

2017-09-15 Thread Amit Langote
On Sat, Sep 16, 2017 at 4:04 AM, Robert Haas wrote: > On Fri, Sep 15, 2017 at 4:50 AM, Amit Langote > wrote: >> Rebased patches attached. Because Dilip complained earlier today about >> clauses of the form (const op var) not causing

Re: [HACKERS] additional contrib test suites

2017-09-15 Thread Michael Paquier
On Sat, Sep 16, 2017 at 5:15 AM, Tom Lane wrote: > I wrote: >> Peter Eisentraut writes: >>> So, we have one failure for chkpass on OpenBSD, because OpenBSD crypt() >>> doesn't support the traditional two-character salt format. > >>> Option: >

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

2017-09-15 Thread Michael Paquier
On Sat, Sep 16, 2017 at 12:42 AM, Robert Haas wrote: > On Thu, Sep 14, 2017 at 12:58 PM, Peter Eisentraut > wrote: >> Second thoughts, to make things simpler. All we need for channel >> binding is a connection flag that says "I require

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

2017-09-15 Thread Thomas Munro
On Sat, Sep 16, 2017 at 9:23 AM, Robert Haas wrote: > On the overall patch set: > > - I am curious to know how this has been tested. How much of the new > code is covered by the tests in 0007-Partition-wise-join-tests.patch? > How much does coverage improve with >

Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with a lot of columns

2017-09-15 Thread Andres Freund
Hi Thom, On 2017-09-15 22:05:35 +0100, Thom Brown wrote: > Okay, I've retested it using a prepared statement executed 100,000 > times (which selects a single row from a table with 101 columns, each > column is 42-43 characters long, and 2 rows in the table), and I get > the following: > >

Re: [HACKERS] pgjdbc logical replication client throwing exception

2017-09-15 Thread Dipesh Dangol
Hi Vladimir, Ya, initially I was trying with withStatusInterval(20, TimeUnit.SECONDS), that didn't work so, then only I switched to .withStatusInterval(20, TimeUnit.MILLISECONDS) but it is not working as well. I am not aware of type of test cases that you are pointing. Could you please send me

Re: [HACKERS] More efficient truncation of pg_stat_activity query strings

2017-09-15 Thread Robert Haas
On Fri, Sep 15, 2017 at 4:49 PM, Andres Freund wrote: > On 2017-09-15 16:45:47 -0400, Tom Lane wrote: >> Andres Freund writes: >> > Version correcting these is attached. Thanks! >> >> I'd vote for undoing the s/st_activity/st_activity_raw/g business. >>

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

2017-09-15 Thread Robert Haas
On Fri, Sep 15, 2017 at 6:11 AM, Ashutosh Bapat wrote: > Thanks a lot Robert. > > Here are rebased patches. I didn't get quite as much time to look at these today as I would have liked, but here's what I've got so far. Comments on 0001: - In the RelOptInfo,

Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with a lot of columns

2017-09-15 Thread Thom Brown
On 15 September 2017 at 19:23, Andres Freund wrote: > Hi Thom, > > Thanks for taking a whack at this! > > On 2017-09-15 12:16:22 +0100, Thom Brown wrote: >> I've run a fairly basic test with a table with 101 columns, selecting >> a single row from the table and I get the

Re: [HACKERS] COMMIT TRIGGERs, take n, implemented with CONSTRAINT TRIGGERS

2017-09-15 Thread Nico Williams
On Fri, Sep 15, 2017 at 04:07:33PM -0400, Tom Lane wrote: > Nico Williams writes: > > On Fri, Sep 15, 2017 at 02:19:29PM -0500, Nico Williams wrote: > >> On Fri, Sep 15, 2017 at 11:26:08AM -0700, Andres Freund wrote: > >>> I think you should also explain why that's a

Re: [HACKERS] More efficient truncation of pg_stat_activity query strings

2017-09-15 Thread Andres Freund
On 2017-09-15 16:45:47 -0400, Tom Lane wrote: > Andres Freund writes: > > Version correcting these is attached. Thanks! > > I'd vote for undoing the s/st_activity/st_activity_raw/g business. > That may have been useful while writing the patch, to ensure you > found all the

Re: [HACKERS] More efficient truncation of pg_stat_activity query strings

2017-09-15 Thread Tom Lane
Andres Freund writes: > Version correcting these is attached. Thanks! I'd vote for undoing the s/st_activity/st_activity_raw/g business. That may have been useful while writing the patch, to ensure you found all the references; but it's just creating a lot of unnecessary

Re: [HACKERS] The case for removing replacement selection sort

2017-09-15 Thread Peter Geoghegan
Tomas' e-mail from earlier today, that I've already replied to directly, seems to have been lost to the mailing list. This must be due to having a 1MB attachment (results spreadsheet), which seems a bit aggressive as a reason to withold it IMV. Here is a link to his results, converted to a Google

Re: [HACKERS] More efficient truncation of pg_stat_activity query strings

2017-09-15 Thread Andres Freund
On 2017-09-15 08:25:09 -0400, Robert Haas wrote: > On Thu, Sep 14, 2017 at 2:03 AM, Andres Freund wrote: > > Here's a patch that implements that idea. > > From the department of cosmetic nitpicking: > > + * All supported server-encodings allow to determine the length of

Re: [HACKERS] postgres_fdw: evaluate placeholdervars on remote server

2017-09-15 Thread Daniel Gustafsson
> On 15 Sep 2017, at 17:19, Robert Haas wrote: > > On Fri, Sep 15, 2017 at 10:15 AM, Daniel Gustafsson wrote: >> Have you had a chance to look at this such that we can expect a rebased >> version >> of this patch during the commitfest? > > Frankly, I

Re: [HACKERS] Clarification in pg10's pgupgrade.html step 10 (upgrading standby servers)

2017-09-15 Thread Bruce Momjian
On Fri, Sep 15, 2017 at 01:23:45AM +0200, Andreas Joseph Krogh wrote: > I tested upgrading from 9.6 to 10 now, using pg_upgrade, and pg_upgrade > creates > the new data-dir with pg_wal "in it" (just like regular initdb), so pg_upgrade > seems not to care about where the old version's pg_xlog was.

Re: [HACKERS] additional contrib test suites

2017-09-15 Thread Tom Lane
I wrote: > Peter Eisentraut writes: >> So, we have one failure for chkpass on OpenBSD, because OpenBSD crypt() >> doesn't support the traditional two-character salt format. >> Option: >> - Use the resultmap features to make this an expected failure on OpenBSD.

Re: [HACKERS] COMMIT TRIGGERs, take n, implemented with CONSTRAINT TRIGGERS

2017-09-15 Thread Tom Lane
Nico Williams writes: > On Fri, Sep 15, 2017 at 02:19:29PM -0500, Nico Williams wrote: >> On Fri, Sep 15, 2017 at 11:26:08AM -0700, Andres Freund wrote: >>> I think you should also explain why that's a desirable set of >>> semantics. > Now, why is this desirable:

Re: [HACKERS] pgjdbc logical replication client throwing exception

2017-09-15 Thread Andres Freund
On 2017-09-15 20:00:34 +, Vladimir Sitnikov wrote: > ++pgjdbc dev list. > > >I am facing unusual connection breakdown problem. Here is the simple code > that I am using to read WAL file: > > Does it always fails? > Can you create a test case? For instance, if you file a pull request with >

Re: [HACKERS] pgjdbc logical replication client throwing exception

2017-09-15 Thread Vladimir Sitnikov
++pgjdbc dev list. >I am facing unusual connection breakdown problem. Here is the simple code that I am using to read WAL file: Does it always fails? Can you create a test case? For instance, if you file a pull request with the test, it will get automatically tested across various PG versions,

Re: [HACKERS] COMMIT TRIGGERs, take n, implemented with CONSTRAINT TRIGGERS

2017-09-15 Thread Nico Williams
On Fri, Sep 15, 2017 at 12:25:08PM -0700, Andres Freund wrote: > On 2017-09-15 14:19:29 -0500, Nico Williams wrote: > > Please see my post and the linked file to see why. > > The discussions here are often going to be referred back to in years, so > external links where we aren't sure about the

Re: [HACKERS] POC: Sharing record typmods between backends

2017-09-15 Thread Andres Freund
On 2017-09-15 15:39:49 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-09-14 23:29:05 -0400, Tom Lane wrote: > >> FWIW, I'm not on board with that. I think the version of typedefs.list > >> in the tree should reflect the last official pgindent run. > > > Why? I

Re: [HACKERS] COMMIT TRIGGERs, take n, implemented with CONSTRAINT TRIGGERS

2017-09-15 Thread Nico Williams
On Fri, Sep 15, 2017 at 02:19:29PM -0500, Nico Williams wrote: > On Fri, Sep 15, 2017 at 11:26:08AM -0700, Andres Freund wrote: > > I think you should also explain why that's a desirable set of > > semantics. Note that DEFERRED CONSTRAINT TRIGGERs already have these semantics, except of course

Re: [HACKERS] POC: Sharing record typmods between backends

2017-09-15 Thread Tom Lane
Andres Freund writes: > On 2017-09-14 23:29:05 -0400, Tom Lane wrote: >> FWIW, I'm not on board with that. I think the version of typedefs.list >> in the tree should reflect the last official pgindent run. > Why? I see pretty much no upside to that. You can't reindent

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-09-15 Thread Oleg Bartunov
On Fri, Sep 15, 2017 at 7:31 PM, Robert Haas wrote: > On Fri, Sep 15, 2017 at 10:10 AM, Daniel Gustafsson wrote: >> Can we expect a rebased version of this patch for this commitfest? Since >> it’s >> a rather large feature it would be good to get it in

Re: [HACKERS] COMMIT TRIGGERs, take n, implemented with CONSTRAINT TRIGGERS

2017-09-15 Thread Andres Freund
Hi, On 2017-09-15 14:19:29 -0500, Nico Williams wrote: > Please see my post and the linked file to see why. The discussions here are often going to be referred back to in years, so external links where we aren't sure about the longevity (like e.g. links to the mailing list archive, where we're

Re: [HACKERS] COMMIT TRIGGERs, take n, implemented with CONSTRAINT TRIGGERS

2017-09-15 Thread Nico Williams
On Fri, Sep 15, 2017 at 11:26:08AM -0700, Andres Freund wrote: > On 2017-09-14 14:41:12 -0500, Nico Williams wrote: > > I've read through several old threads on COMMIT TRIGGERs. Rather than > > write a lengthy post addressing past debates, here's an implementation > > and demonstration of [an

Re: [HACKERS] path toward faster partition pruning

2017-09-15 Thread Robert Haas
On Fri, Sep 15, 2017 at 4:50 AM, Amit Langote wrote: > Rebased patches attached. Because Dilip complained earlier today about > clauses of the form (const op var) not causing partition-pruning, I've > added code to commute the clause where it is required. Some

Re: [HACKERS] Patch: add --if-exists to pg_recvlogical

2017-09-15 Thread Peter Eisentraut
On 9/15/17 13:18, Rosser Schwarz wrote: > On Fri, Sep 15, 2017 at 04:15 Daniel Gustafsson > wrote: > > This patch is "Waiting for Author” due to the above review comments > from Peter > and Thomas.  Do you think you will have time to address

Re: [HACKERS] COMMIT TRIGGERs, take n, implemented with CONSTRAINT TRIGGERS

2017-09-15 Thread Andres Freund
Hi, On 2017-09-14 14:41:12 -0500, Nico Williams wrote: > I've read through several old threads on COMMIT TRIGGERs. Rather than > write a lengthy post addressing past debates, here's an implementation > and demonstration of [an approximation of] COMMIT TRIGGERs with natural > and _desirable_

Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with a lot of columns

2017-09-15 Thread Andres Freund
Hi Thom, Thanks for taking a whack at this! On 2017-09-15 12:16:22 +0100, Thom Brown wrote: > I've run a fairly basic test with a table with 101 columns, selecting > a single row from the table and I get the following results: > > > Columns with 1-character names: > > master (80 jobs, 80

Re: [HACKERS] CLUSTER command progress monitor

2017-09-15 Thread Jeff Janes
On Wed, Aug 30, 2017 at 7:12 PM, Tatsuro Yamada < yamada.tats...@lab.ntt.co.jp> wrote: > > The view provides the information of CLUSTER command progress details as > follows > postgres=# \d pg_stat_progress_cluster >View "pg_catalog.pg_stat_progress_cluster" >Column|

Re: [HACKERS] POC: Sharing record typmods between backends

2017-09-15 Thread Andres Freund
On 2017-09-14 23:29:05 -0400, Tom Lane wrote: > Thomas Munro writes: > > On Fri, Sep 15, 2017 at 3:03 PM, Andres Freund wrote: > >> - added typedefs to typedefs.list > > > Should I do this manually with future patches? I think there's sort of

Re: [HACKERS] The case for removing replacement selection sort

2017-09-15 Thread Peter Geoghegan
On Fri, Sep 15, 2017 at 6:34 AM, Tomas Vondra wrote: > e5-2620-v4 > -- > - probably the CPU we should be looking at, as it's the current model > - in some cases this gives us 3-5x speedup with low work_mem settings > - consider for example the very last line,

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-15 Thread Arseny Sher
Peter Eisentraut writes: > Here is a simple patch that fixes this, based on my original proposal > point #4. I checked, it passes the tests and solves the problem. However, isn't this + if (slotname || !subenabled) is a truism? Is it possible

Re: [HACKERS] Patch: add --if-exists to pg_recvlogical

2017-09-15 Thread Rosser Schwarz
On Fri, Sep 15, 2017 at 04:15 Daniel Gustafsson wrote: > This patch is "Waiting for Author” due to the above review comments from > Peter > and Thomas. Do you think you will have time to address these shortly so > we can > move this patch further in the process? I have a

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-15 Thread Amit Langote
On Sat, Sep 16, 2017 at 12:59 AM, Robert Haas wrote: > On Fri, Sep 15, 2017 at 2:00 AM, Amit Langote > wrote: >> I wonder if we should call check_default_allows_bound() from >> ATExecAttachPartition(), too, instead of validating updated

[HACKERS] pgjdbc logical replication client throwing exception

2017-09-15 Thread Dipesh Dangol
hi, I am trying to implement logical replication stream API of postgresql. I am facing unusual connection breakdown problem. Here is the simple code that I am using to read WAL file: String url = "jdbc:postgresql://pcnode2:5432/benchmarksql"; Properties props = new Properties();

Re: [HACKERS] GnuTLS support

2017-09-15 Thread Jeff Janes
On Thu, Aug 31, 2017 at 10:52 AM, Andreas Karlsson wrote: > > > > = Work left to do > > - Test code with older versions of GnuTLS > I can't build against gnutls-2.12.23-21.el6.x86_64 from CentOS 6.9 be-secure-gnutls.c: In function 'be_tls_init': be-secure-gnutls.c:168:

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-09-15 Thread Robert Haas
On Fri, Sep 15, 2017 at 10:10 AM, Daniel Gustafsson wrote: > Can we expect a rebased version of this patch for this commitfest? Since it’s > a rather large feature it would be good to get it in as early as we can in the > process. Again, given that this needs a "major" rebase

Re: [HACKERS] Log LDAP "diagnostic messages"?

2017-09-15 Thread Peter Eisentraut
On 9/14/17 10:21, Alvaro Herrera wrote: > BTW I added --with-ldap and --with-pam to the configure line for the > reports in coverage.postgresql.org and the % covered in auth.c went from > 24% to 18.9% (from very bad to terribly sad). You can add src/test/ldap/ now to make up for some of that. --

Re: [HACKERS] More flexible LDAP auth search filters?

2017-09-15 Thread Peter Eisentraut
On 9/12/17 19:04, Thomas Munro wrote: >> Any further thoughts on the test suite? Otherwise I'll commit it as we >> have it, for manual use. done > I wonder if there is a reasonable way to indicate or determine whether > you have slapd installed so that check-world could run this test... The

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

2017-09-15 Thread Robert Haas
On Fri, Sep 15, 2017 at 3:54 AM, Tsunakawa, Takayuki wrote: > So far, there are four proponents (Tels (non-PG-developer), David J., Robert > and me), and two opponents (Tom and Michael). 4-2 is a reasonable vote in favor of proceeding, although it's a bit

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-15 Thread Robert Haas
On Fri, Sep 15, 2017 at 2:00 AM, Amit Langote wrote: > I wonder if we should call check_default_allows_bound() from > ATExecAttachPartition(), too, instead of validating updated default > partition constraint using ValidatePartitionConstraints()? That is, call >

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

2017-09-15 Thread Robert Haas
On Thu, Sep 14, 2017 at 12:58 PM, Peter Eisentraut wrote: > Second thoughts, to make things simpler. All we need for channel > binding is a connection flag that says "I require channel binding". It > could be modeled after the sslmode parameter, e.g.,

Re: [HACKERS] Process startup infrastructure is a mess

2017-09-15 Thread Robert Haas
On Thu, Sep 14, 2017 at 9:30 PM, Stephen Frost wrote: > I'm definitely in agreement with Andres on this one. This isn't > refactoring of little-to-never changed code, it's refactoring bits of > the system which are changed with some regularity and looks likely to > continue

Re: [HACKERS] Surjective functional indexes

2017-09-15 Thread Konstantin Knizhnik
On 14.09.2017 18:53, Simon Riggs wrote: It's not going to work, as already mentioned above. Those stats are at table level and very little to do with this particular index. But you've not commented on the design I mention that can work: index relcache. Concerning your idea to check cost of

Re: [HACKERS] [PATCH] Improve geometric types

2017-09-15 Thread Robert Haas
On Fri, Sep 15, 2017 at 4:23 AM, Kyotaro HORIGUCHI wrote: > /* don't merge the following same functions with different types >into single macros so that double evaluation won't happen */ > > Is it still too verbose? Personally, I don't think such a comment

Re: [HACKERS] postgres_fdw: evaluate placeholdervars on remote server

2017-09-15 Thread Robert Haas
On Fri, Sep 15, 2017 at 10:15 AM, Daniel Gustafsson wrote: > Have you had a chance to look at this such that we can expect a rebased > version > of this patch during the commitfest? Frankly, I think things where there was a ping multiple weeks before the CommitFest started and

Re: [HACKERS] Renaming PG_GETARG functions (was Re: PG_GETARG_GISTENTRY?)

2017-09-15 Thread Daniel Gustafsson
> On 12 Sep 2017, at 22:07, Tom Lane wrote: > > [ changing subject line to possibly draw more attention ] > > Mark Dilger writes: >>> On Apr 5, 2017, at 9:23 AM, Tom Lane wrote: >>> In short, if you are supposed to write >>>

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-09-15 Thread i . kartyshov
Alexander Korotkov писал 2017-09-05 00:33: I've following comments on this patch: 1) You shouldn't use ">=" to compare xids. You should use TransactionIdFollowsOrEquals() function which handles transaction id wraparound correctly. I fixed it and as an additional I add GUC parameter that could

Re: [HACKERS] Support to COMMENT ON DATABASE CURRENT_DATABASE

2017-09-15 Thread Bossart, Nathan
A few general comments. While this patch applies, I am still seeing some whitespace errors: comment_on_current_database_no_pgdump_v4.1.patch:488: trailing whitespace. ColId comment_on_current_database_no_pgdump_v4.1.patch:490: trailing whitespace.

Re: [HACKERS] Statement-level rollback

2017-09-15 Thread Daniel Gustafsson
> On 01 Sep 2017, at 13:44, Simon Riggs wrote: > > On 14 August 2017 at 23:58, Peter Eisentraut > wrote: >> On 2/28/17 02:39, Tsunakawa, Takayuki wrote: >>> The code for stored functions is not written yet, but I'd like your >>> feedback

Re: [HACKERS] postgres_fdw: evaluate placeholdervars on remote server

2017-09-15 Thread Daniel Gustafsson
> On 15 Aug 2017, at 01:00, Peter Eisentraut > wrote: > > On 4/3/17 22:00, Etsuro Fujita wrote: >> On 2017/04/04 3:21, Andres Freund wrote: >>> On 2017-02-28 21:45:22 +0900, Etsuro Fujita wrote: Here is a patch for $subject. >>> >>> This is a nontrivial

Re: [HACKERS] pg_rewind proposed scope and interface changes

2017-09-15 Thread Chris Travers
On Wed, Sep 13, 2017 at 6:28 AM, Michael Paquier wrote: > On Tue, Sep 12, 2017 at 11:52 PM, Chris Travers > wrote: > > Additionally the wal, xact, timestamp and logical directories must be > > processed in some way. > > To what does the term

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-09-15 Thread Daniel Gustafsson
> On 15 Aug 2017, at 04:30, Peter Eisentraut > wrote: > > On 3/15/17 11:56, David Steele wrote: >>> This patch has been moved to CF 2017-07. >> >> I did not manage to move this patch when I said had. It is now moved. > > Unsurprisingly, this patch needs a

Re: [HACKERS] Allow INSTEAD OF DELETE triggers to modify the tuple for RETURNING

2017-09-15 Thread Daniel Gustafsson
> On 05 Sep 2017, at 10:44, Haribabu Kommi wrote: > > On Mon, Aug 14, 2017 at 6:48 AM, Marko Tiikkaja > wrote: > On Fri, Jul 1, 2016 at 2:12 AM, I wrote: > Currently the tuple returned by INSTEAD OF triggers on DELETEs is only used

Re: [HACKERS] Re: DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-15 Thread Peter Eisentraut
On 9/12/17 15:37, Peter Eisentraut wrote: > On 9/11/17 14:26, Peter Eisentraut wrote: >> On 9/10/17 12:14, 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 >>>

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-15 Thread Peter Eisentraut
On 9/14/17 15:47, Arseny Sher wrote: > Peter Eisentraut writes: > >> On 9/13/17 07:00, Arseny Sher wrote: >>> On the other hand, forbidding to execute disable sub and drop sub in one >>> transaction makes it impossible e.g. to drop subscription in trigger >> >>

Re: [HACKERS] additional contrib test suites

2017-09-15 Thread Tom Lane
Peter Eisentraut writes: > So, we have one failure for chkpass on OpenBSD, because OpenBSD crypt() > doesn't support the traditional two-character salt format. > Option: > - Use the resultmap features to make this an expected failure on OpenBSD. > - Fix the

Re: [HACKERS] COMMIT TRIGGERs, take n, implemented with CONSTRAINT TRIGGERS

2017-09-15 Thread Nico Williams
On Fri, Sep 15, 2017 at 4:11 AM Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Thu, Sep 14, 2017 at 10:41 PM, Nico Williams > wrote: > >> https://github.com/twosigma/postgresql-contrib/ >> >>

Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions

2017-09-15 Thread Alexander Korotkov
On Fri, Sep 15, 2017 at 3:36 PM, Andrey Borodin wrote: > > 14 сент. 2017 г., в 18:42, Alexander Korotkov > написал(а): > > It would be good if someone would write patch for removing useless > compress/decompress methods from builtin and contrib

Re: [HACKERS] additional contrib test suites

2017-09-15 Thread Peter Eisentraut
On 9/14/17 22:47, Peter Eisentraut wrote: >> As for testing on more platforms, send it to the build farm? > OK, committed, let's see. So, we have one failure for chkpass on OpenBSD, because OpenBSD crypt() doesn't support the traditional two-character salt format. Option: - Use the resultmap

Re: [HACKERS] Log LDAP "diagnostic messages"?

2017-09-15 Thread Thomas Munro
On Fri, Sep 15, 2017 at 2:12 AM, Alvaro Herrera wrote: > I think the ldap_unbind() changes should be in a separate preliminary > patch to be committed separately and backpatched. OK, here it is split into two patches. > The other bits looks fine, with nitpicks > > 1.

Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions

2017-09-15 Thread Andrey Borodin
Dmitry and Alexander, thank you for looking into the patch! > 14 сент. 2017 г., в 18:42, Alexander Korotkov > написал(а): > It would be good if someone would write patch for removing useless > compress/decompress methods from builtin and contrib GiST opclasses. >

Re: [HACKERS] no test coverage for ALTER FOREIGN DATA WRAPPER name HANDLER ...

2017-09-15 Thread Amit Langote
On Fri, Sep 15, 2017 at 9:20 PM, Robert Haas wrote: > On Thu, Sep 14, 2017 at 8:30 AM, Ashutosh Bapat > wrote: >> LGTM. The patch applies cleanly on the current HEAD, compiles (small >> bit in regress.c requires compilation), and make check

Re: [HACKERS] More efficient truncation of pg_stat_activity query strings

2017-09-15 Thread Robert Haas
On Thu, Sep 14, 2017 at 2:03 AM, Andres Freund wrote: > Here's a patch that implements that idea. >From the department of cosmetic nitpicking: + * All supported server-encodings allow to determine the length of a make it possible to determine + * multi-byte

Re: [HACKERS] no test coverage for ALTER FOREIGN DATA WRAPPER name HANDLER ...

2017-09-15 Thread Robert Haas
On Thu, Sep 14, 2017 at 8:30 AM, Ashutosh Bapat wrote: > LGTM. The patch applies cleanly on the current HEAD, compiles (small > bit in regress.c requires compilation), and make check passes. Marking > this as "ready for committer". Committed. -- Robert Haas

Re: [HACKERS] More efficient truncation of pg_stat_activity query strings

2017-09-15 Thread Kuntal Ghosh
On Thu, Sep 14, 2017 at 11:33 AM, Andres Freund wrote: > On 2017-09-12 00:19:48 -0700, Andres Freund wrote: >> Hi, >> >> I've recently seen a benchmark in which pg_mbcliplen() showed up >> prominently. Which it will basically in any benchmark with longer query >> strings, but

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

2017-09-15 Thread Ashutosh Bapat
On Fri, Sep 15, 2017 at 2:09 PM, Rafia Sabih wrote: > On TPC-H benchmarking of this patch, I found a regression in Q7. It > was taking some 1500s with the patch and some 900s without the patch. > Please find the attached pwd_reg.zip for the output of explain analyse

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2017-09-15 Thread Daniel Gustafsson
> On 06 Sep 2017, at 09:45, Haribabu Kommi wrote: > > On Tue, Jul 25, 2017 at 9:33 PM, Tomas Vondra > wrote: > On 7/25/17 12:55 AM, Tom Lane wrote: > Tomas Vondra

Re: [HACKERS] [PATCH] Off-by-one error in logical slot resource retention

2017-09-15 Thread Daniel Gustafsson
> On 01 Sep 2017, at 14:28, Aleksander Alekseev > wrote: > > The following review has been posted through the commitfest application: > make installcheck-world: not tested > Implements feature: not tested > Spec compliant: not tested > Documentation:

Re: [HACKERS] SendRowDescriptionMessage() is slow for queries with a lot of columns

2017-09-15 Thread Thom Brown
On 14 September 2017 at 07:34, Andres Freund wrote: > Hi, > > When running workloads that include fast queries with a lot of columns, > SendRowDescriptionMessage(), and the routines it calls, becomes a > bottleneck. Besides syscache lookups (see [1] and [2]) a major cost of >

Re: [HACKERS] Patch: add --if-exists to pg_recvlogical

2017-09-15 Thread Daniel Gustafsson
> On 09 Sep 2017, at 06:05, Thomas Munro wrote: > > On Sat, Sep 2, 2017 at 5:22 AM, Peter Eisentraut > wrote: >> >> + --if-exists >> + >> + >> +Do not error out when --drop-slot or >> --start are >>

Re: [HACKERS] path toward faster partition pruning

2017-09-15 Thread Amit Langote
On 2017/09/15 11:16, Amit Langote wrote: > I will post rebased patches later today, although I think the overall > design of the patch on the planner side of things is not quite there yet. > Of course, your and others' feedback is greatly welcome. Rebased patches attached. Because Dilip

Re: [HACKERS] [PATCH] Improve geometric types

2017-09-15 Thread Kyotaro HORIGUCHI
Hello, just one point on 0001. The patch replace pg_hypot with hypot in libc. The man page says as follows. man 3 hypot > If the result overflows, a range error occurs, and the functions return > HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively. .. >ERRORS > See math_error(7)

Re: [HACKERS] [PATCH] Improve geometric types

2017-09-15 Thread Kyotaro HORIGUCHI
At Fri, 15 Sep 2017 17:23:28 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170915.172328.97446299.horiguchi.kyot...@lab.ntt.co.jp> > At Thu, 14 Sep 2017 16:19:13 -0400, Robert Haas wrote > in

Re: [HACKERS] [PATCH] Improve geometric types

2017-09-15 Thread Kyotaro HORIGUCHI
At Thu, 14 Sep 2017 16:19:13 -0400, Robert Haas wrote in > On Thu, Sep 14, 2017 at 3:33 AM, Kyotaro HORIGUCHI > wrote: > > I recall a bit about the double-evaluation

Re: [HACKERS] Surjective functional indexes

2017-09-15 Thread Konstantin Knizhnik
On 14.09.2017 18:53, Simon Riggs wrote: This works by looking at overall stats, and only looks at the overall HOT %, so its too heavyweight and coarse. I suggested storing stat info on the relcache and was expecting you would look at how often the expression evaluates to new == old. If we

Re: [HACKERS] COMMIT TRIGGERs, take n, implemented with CONSTRAINT TRIGGERS

2017-09-15 Thread Alexander Korotkov
On Thu, Sep 14, 2017 at 10:41 PM, Nico Williams wrote: > https://github.com/twosigma/postgresql-contrib/ > https://github.com/twosigma/postgresql-contrib/blob/ > master/commit_trigger.sql > https://raw.githubusercontent.com/twosigma/postgresql- >

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

2017-09-15 Thread Tsunakawa, Takayuki
Hello Tom, Michael, Robert, Noah From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Robert Haas > On Thu, Sep 14, 2017 at 3:23 AM, Tsunakawa, Takayuki > wrote: > > Sorry again, but how can we handle this? A

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-09-15 Thread Amit Langote
On 2017/09/14 16:00, Michael Paquier wrote: > On Wed, Sep 13, 2017 at 4:43 PM, Amit Langote > wrote: >> Sure, no problem. > > OK, I took a closer look at all patches, but did not run any manual > tests to test the compression except some stuff with >

Re: [HACKERS] Race between SELECT and ALTER TABLE NO INHERIT

2017-09-15 Thread Amit Langote
On 2017/09/15 15:36, Amit Langote wrote: > The fact that > parent is locked after the child and with ShareUpdateExclusiveLock instead > of AccessExclusiveLock, we observe this race condition when SELECTing from > the parent. Oops, I meant "parent table is locked with AccessShareLock instead of

Re: [HACKERS] Race between SELECT and ALTER TABLE NO INHERIT

2017-09-15 Thread Amit Langote
Hi. On 2017/08/28 18:28, Kyotaro HORIGUCHI wrote: > << the following is another topic >> > BTW, in the partitioned table case, the parent is always locked first using an AccessExclusiveLock. There are other considerations in that case such as needing to recreate the partition

Re: [HACKERS] Add Roman numeral conversion to to_number

2017-09-15 Thread Douglas Doole
Ah. Sorry I missed them - I'll give them a look. (Won't be able to get to it until Saturday though.) On Thu, Sep 14, 2017 at 10:06 PM Oliver Ford wrote: > I'll fix the brace, but there are two other patches in the first email for > tests and docs. For some reason the commitfest

Re: [HACKERS] [POC] hash partitioning

2017-09-15 Thread amul sul
On Fri, Sep 15, 2017 at 4:30 AM, Thom Brown wrote: > On 14 September 2017 at 09:58, amul sul wrote: > > On Wed, Sep 13, 2017 at 7:43 PM, Jesper Pedersen > > wrote: > >> > >> Hi Amul, > >> > >> On 09/08/2017 08:40 AM, amul sul

Re: [HACKERS] utility commands benefiting from parallel plan

2017-09-15 Thread Haribabu Kommi
On Thu, Sep 14, 2017 at 2:42 PM, Rafia Sabih wrote: > On Wed, Sep 13, 2017 at 2:29 PM, Haribabu Kommi > wrote: > > > > > > On Wed, Sep 13, 2017 at 4:17 PM, Rafia Sabih < > rafia.sa...@enterprisedb.com> > > wrote: > >> > >> On Fri, Sep 1,

Re: [HACKERS] Optimise default partition scanning while adding new partition

2017-09-15 Thread Amit Langote
On 2017/09/15 0:59, Robert Haas wrote: > On Thu, Sep 14, 2017 at 4:03 AM, Jeevan Ladhe > wrote: >> Thanks Amit for reviewing. >>> Patch looks fine to me. By the way, why don't we just say "Can we skip >>> scanning part_rel?" in the comment before the newly added