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 > wal_consistency_checking. Thanks for the revi

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 non-PG-developer, Tels (and > possibly s

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- > contrib/master/commit_trigger.sql Do I understan

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 ev

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 hazards. I think the > > functions needs a comment describing the reasons so that anyone > > kind won't try to merge them into a

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 > > On Thu, Sep 14, 2017 at 3:33 AM, Kyotaro HORIGUCHI > > wrote: > > > I recall a bit

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

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 complaine

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 >> +specified and a slot with the specified name does not ex

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 > that is manipulation

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:not tested > > H

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 > writes: > It seems to me that VACUUM and ANALYZE somewha

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 > on head and with patch. > > T

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 fast queries. That's

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 EnterpriseDB: http://www.enterprisedb

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 character from it's first by

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 passes. Marking >> this as "ready for committer". > > Co

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. > Especially when it gives bene

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. please move the new support

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 fea

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 GiST opclasses. > Especially when it gives benefit

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/ >> >> https://github.com/twosigma/postgresql-contrib/blob/master/commit_trigger.sql >> >> https://

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 module to work on OpenBSD. This woul

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 >> >> Disabling a subscription before dro

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

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 > to determine whether to pretend that the

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 major rebase. Can we expect a rebase

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 "logical directories" refer to? > > > * if --wal=syn

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 patch, submitted just before the sta

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 for the specification and design based on the current pat

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

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 >>> FOO *val = PG_GETARG_FOO(n); >>> then the macro designer blew it

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 no rebase before i

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 has much value, but I am not going t

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 i

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 to need change as we a

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., cbind=disable (maybe > for debugging), cbind

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 > the latter only to validate the pa

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 marginal given the stature of the oppone

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 oth

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] 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 and hasn't been upd

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: warning: implicit declar

[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] 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 default >> partition constraint using ValidatePartitionConst

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 patch addressing both

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 that subscription has no slot but sti

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, which shows that > > SELECT

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 a circuit split on that one. Robert and I do regular

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

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 conne

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

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

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 other > previously mentioned limita

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 appr

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 fa

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 as early as we can in >> the >> process.

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 anyway, due > to unindented

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 tha

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 see pretty much no upsi

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 lo

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

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

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: atomicity. >The client/user

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. >> - Fix the module to work on Ope

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] 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 think things where there was a ping multipl

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 a > > make it possib

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 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 delta in the final code,

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 references; but it's ju

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 desirable set of > >>> semanti

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

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, part_oids is defined in a completely

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. >> That may have been useful while writing the

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 any

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

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 > 0008-Extra-testcases-for-partiti

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 channel binding". It >> could be modeled after the sslmode

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: > >>> - Use the resultmap features to make this an expec

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 partition-pruning, I've >> added code to commute the clause whe

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 to push this to the next CF, it seems we need a lot more > >

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 this, committed the patch for

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

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? > > The general picture here is that we don't want the

Re: [HACKERS] Parallel Append implementation

2017-09-15 Thread Amit Kapila
On Thu, Sep 14, 2017 at 8:30 PM, Amit Khandekar wrote: > On 11 September 2017 at 18:55, Amit Kapila wrote: >>> >> >> How? See, if you have four partial subpaths and two non-partial >> subpaths, then for parallel-aware append it considers all six paths in >> parallel path whereas for non-parallel