Re: [HACKERS] [TRAP: FailedAssertion] causing server to crash

2017-07-19 Thread Craig Ringer
> > On 19 July 2017 at 20:26, Neha Sharma > wrote: > >> Hi, >> >> I am getting FailedAssertion while executing the attached >> script.However,I am not able to produce the core dump for the same,the >> script runs in background and takes around a day time to produce

Re: [HACKERS] <> join selectivity estimate question

2017-07-19 Thread Thomas Munro
On Fri, Jun 2, 2017 at 4:16 AM, Tom Lane wrote: > I don't think it does really. The thing about a <> semijoin is that it > will succeed unless *every* join key value from the inner query is equal > to the outer key value (or is null). That's something we should consider > to

Re: [HACKERS] [TRAP: FailedAssertion] causing server to crash

2017-07-19 Thread Craig Ringer
On 19 July 2017 at 20:26, Neha Sharma wrote: > Hi, > > I am getting FailedAssertion while executing the attached script.However,I > am not able to produce the core dump for the same,the script runs in > background and takes around a day time to produce the mentioned

Re: [HACKERS] Dealing with logical replication

2017-07-19 Thread Craig Ringer
On 19 July 2017 at 16:34, Tatsuo Ishii wrote: > Now that we are going to have logical replication in PostgreSQL 10, I > have started thinking how Pgpool-II can deal with it. For example, the > logical replication does not replicate DDLs. Isn't it convenient for > users to do

Re: [HACKERS] psql's \r broken since e984ef5861d

2017-07-19 Thread Julien Rouhaud
On 20/07/2017 04:24, Tom Lane wrote: > I wrote: >> Ah. I don't feel like trawling the archives for the discussion right now, >> but I believe this was an intentional change to make the behavior more >> consistent. > > Oh ... a quick look in the commit log finds the relevant discussion: >

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-07-19 Thread Peter Geoghegan
On Wed, Jul 19, 2017 at 8:33 PM, Craig Ringer wrote: > That's silly, so here's a patch to teach pageinspect how to decode infomasks > to a human readable array of flag names. > > Example: > > SELECT t_infomask, t_infomask2, flags > FROM heap_page_items(get_raw_page('test1',

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2017-07-19 Thread Craig Ringer
On 20 July 2017 at 11:33, Craig Ringer wrote: > Hi > > Whenever I'm debugging some kind of corruption incident, possible > visibility bug, etc, I always land up staring at integer infomasks or using > a SQL helper function to decode them. > > That's silly, so here's a

[HACKERS] [PATCH] pageinspect function to decode infomasks

2017-07-19 Thread Craig Ringer
Hi Whenever I'm debugging some kind of corruption incident, possible visibility bug, etc, I always land up staring at integer infomasks or using a SQL helper function to decode them. That's silly, so here's a patch to teach pageinspect how to decode infomasks to a human readable array of flag

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

2017-07-19 Thread Thomas Munro
On Thu, Jul 20, 2017 at 2:02 PM, Robert Haas wrote: > On Wed, Jul 19, 2017 at 7:45 PM, Thomas Munro > wrote: >> Isn't this the same as the issue reported here? >> >>

Re: [HACKERS] autovacuum can't keep up, bloat just continues to rise

2017-07-19 Thread Peter Geoghegan
On Wed, Jul 19, 2017 at 7:57 PM, Tom Lane wrote: > Peter Geoghegan writes: >> My argument for the importance of index bloat to the more general >> bloat problem is simple: any bloat that accumulates, that cannot be >> cleaned up, will probably accumulate until

Re: [HACKERS] autovacuum can't keep up, bloat just continues to rise

2017-07-19 Thread Tom Lane
Peter Geoghegan writes: > My argument for the importance of index bloat to the more general > bloat problem is simple: any bloat that accumulates, that cannot be > cleaned up, will probably accumulate until it impacts performance > quite noticeably. But that just begs the question:

Re: [HACKERS] autovacuum can't keep up, bloat just continues to rise

2017-07-19 Thread Masahiko Sawada
On Thu, Jul 20, 2017 at 8:24 AM, Stephen Frost wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> "Joshua D. Drake" writes: >> > At PGConf US Philly last week I was talking with Jim and Jan about >> > performance. One of the items that came up is that

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-07-19 Thread Etsuro Fujita
On 2017/07/19 23:36, Tom Lane wrote: Etsuro Fujita writes: * Modified rewrite_targetlist(), which is a new function added to preptlist.c, so that we do const-simplification to junk TLEs that AddForeignUpdateTargets() added, as that API allows the FDW to add junk

Re: [HACKERS] psql's \r broken since e984ef5861d

2017-07-19 Thread Tom Lane
I wrote: > Ah. I don't feel like trawling the archives for the discussion right now, > but I believe this was an intentional change to make the behavior more > consistent. Oh ... a quick look in the commit log finds the relevant discussion:

Re: [HACKERS] autovacuum can't keep up, bloat just continues to rise

2017-07-19 Thread Peter Geoghegan
On Wed, Jul 19, 2017 at 3:54 PM, Alvaro Herrera wrote: >> Index bloat is a general problem that B-Trees have in all other major >> systems, but I think that PostgreSQL has a tendency to allow indexes >> to become progressively more bloated over time, in a way that it

Re: [HACKERS] psql's \r broken since e984ef5861d

2017-07-19 Thread Tom Lane
Julien Rouhaud writes: > On 20/07/2017 03:34, Tom Lane wrote: >> Works for me. Please describe exactly what misbehavior you're seeing. > Here's a simple test case, last \p still show the query buffer: Ah. I don't feel like trawling the archives for the discussion

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

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 7:45 PM, Thomas Munro wrote: > On Thu, Jul 20, 2017 at 7:00 AM, Robert Haas wrote: >> I think the problem is that the row count estimates for the child >> joins seem to be totally bogus: >> >> -> Hash Semi Join

Re: [HACKERS] psql's \r broken since e984ef5861d

2017-07-19 Thread Julien Rouhaud
On 20/07/2017 03:34, Tom Lane wrote: > Julien Rouhaud writes: >> Unless I miss something, \r isn't working anymore, > > Works for me. Please describe exactly what misbehavior you're seeing. > What libreadline or libedit version are you using? > I have libreadline

Re: [HACKERS] psql's \r broken since e984ef5861d

2017-07-19 Thread Tom Lane
Julien Rouhaud writes: > Unless I miss something, \r isn't working anymore, Works for me. Please describe exactly what misbehavior you're seeing. What libreadline or libedit version are you using? regards, tom lane -- Sent via pgsql-hackers

[HACKERS] psql's \r broken since e984ef5861d

2017-07-19 Thread Julien Rouhaud
Hello, Unless I miss something, \r isn't working anymore, since exec_command_print() fallback to display previous_buf if query_buf has been freed. Trivial patch to fix issue (free both buffers in exec_command_reset()) attached. Regards. -- Julien Rouhaud diff --git a/src/bin/psql/command.c

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

2017-07-19 Thread Thomas Munro
On Thu, Jul 20, 2017 at 7:00 AM, Robert Haas wrote: > I think the problem is that the row count estimates for the child > joins seem to be totally bogus: > > -> Hash Semi Join (cost=309300.53..491665.60 rows=1 width=12) > (actual time=10484.422..15945.851 rows=1523493

Re: [HACKERS] autovacuum can't keep up, bloat just continues to rise

2017-07-19 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > "Joshua D. Drake" writes: > > At PGConf US Philly last week I was talking with Jim and Jan about > > performance. One of the items that came up is that PostgreSQL can't run > > full throttle for long periods of time. The long and

Re: [HACKERS] JSONB - JSONB operator feature request

2017-07-19 Thread Merlin Moncure
On Tue, Jul 18, 2017 at 12:49 PM, David Fetter wrote: > On Tue, Jul 18, 2017 at 01:36:32PM +0200, david.tu...@linuxbox.cz wrote: >> Hi, >> >> some users and me used hstore - hstore for example storing only changed >> rows in trigger like: >> >> hsore(NEW) - hstore(OLD) >> >>

Re: [HACKERS] autovacuum can't keep up, bloat just continues to rise

2017-07-19 Thread Joe Conway
On 07/19/2017 03:29 PM, Tom Lane wrote: > "Joshua D. Drake" writes: >> At PGConf US Philly last week I was talking with Jim and Jan about >> performance. One of the items that came up is that PostgreSQL can't run >> full throttle for long periods of time. The long and

Re: [HACKERS] autovacuum can't keep up, bloat just continues to rise

2017-07-19 Thread Alvaro Herrera
Peter Geoghegan wrote: > Index bloat is a general problem that B-Trees have in all other major > systems, but I think that PostgreSQL has a tendency to allow indexes > to become progressively more bloated over time, in a way that it often > can never recover from [1]. Interesting assertion.

Re: [HACKERS] autovacuum can't keep up, bloat just continues to rise

2017-07-19 Thread Tom Lane
"Joshua D. Drake" writes: > At PGConf US Philly last week I was talking with Jim and Jan about > performance. One of the items that came up is that PostgreSQL can't run > full throttle for long periods of time. The long and short is that no > matter what, autovacuum

Re: [HACKERS] autovacuum can't keep up, bloat just continues to rise

2017-07-19 Thread Peter Geoghegan
On Wed, Jul 19, 2017 at 3:11 PM, Joshua D. Drake wrote: > The good news is, PostgreSQL is not doing half bad against 128 connections > with only 16vCPU. The bad news is we more than doubled our disk size without > getting reuse or bloat under control. The concern here is

[HACKERS] autovacuum can't keep up, bloat just continues to rise

2017-07-19 Thread Joshua D. Drake
Hello, At PGConf US Philly last week I was talking with Jim and Jan about performance. One of the items that came up is that PostgreSQL can't run full throttle for long periods of time. The long and short is that no matter what, autovacuum can't keep up. This is what I have done: Machine:

Re: [HACKERS] Authentication mechanisms categorization

2017-07-19 Thread Álvaro Hernández Tortosa
On 14/07/17 13:29, Michael Paquier wrote: On Fri, Jul 14, 2017 at 12:16 PM, Álvaro Hernández Tortosa wrote: If the parameter authmethod would rather be "authmethods", i.e., a list, I think it would be significantly more flexible. Yes, but the handling of a list becomes

Re: [HACKERS] pl/perl extension fails on Windows

2017-07-19 Thread Tom Lane
Ashutosh Sharma writes: > Here are the list of macros and variables from 'intrpvar.h' file that > are just defined in perl module but not in plperl on Windows, > #ifdef PERL_USES_PL_PIDSTATUS > PERLVAR(I, pidstatus, HV *) /* pid-to-status mappings for waitpid */ >

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-19 Thread Mark Rofail
On Wed, Jul 19, 2017 at 10:08 PM, Alvaro Herrera wrote: > So let's step back a bit, > get a patch that works for the case where the types match on both sides > of the FK, then we review that patch; if all is well, we can discuss the > other problem as a stretch goal.

[HACKERS] pgbench minor doc typo

2017-07-19 Thread Fabien COELHO
Alik Khilazhev is submitting a patch about a zipfian random function for pgbench, and noticed a typo in the documentation about random_exponential. Attached is a fix extracted from his patch submission, which could be applied to head/10/9.6. -- Fabien.diff --git

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Tom Lane
Michael Paquier writes: > On Wed, Jul 19, 2017 at 8:56 PM, Tom Lane wrote: >> I wonder if it'd be worth the trouble to stick something like this into >> xlog.c: >> StaticAssertStmt(sizeof(ControlFileData) <= 512, >> "pg_control is too large for

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-19 Thread Alvaro Herrera
Mark Rofail wrote: > On Tue, Jul 18, 2017 at 11:14 PM, Alvaro Herrera > wrote: > > > > Why did we add an operator and not a support > > procedure? > > I thought the support procedures were constant within an opclass. Uhh ... I apologize but I think I was barking at the

Re: [HACKERS] [TRAP: FailedAssertion] causing server to crash

2017-07-19 Thread Alvaro Herrera
Robert Haas wrote: > On Wed, Jul 19, 2017 at 8:26 AM, Neha Sharma > wrote: > > I am getting FailedAssertion while executing the attached script.However,I > > am not able to produce the core dump for the same,the script runs in > > background and takes around a day

Re: [HACKERS] New partitioning - some feedback

2017-07-19 Thread Robert Haas
On Tue, Jul 18, 2017 at 2:26 AM, Vik Fearing wrote: > On 07/07/2017 02:02 AM, Mark Kirkwood wrote: >> I'd prefer *not* to see a table and its partitions all intermixed in the >> same display (especially with nothing indicating which are partitions) - >> as this will

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 3:26 PM, Mark Dilger wrote: >> Typically, when you try to store an out-of-range value in PostgreSQL, >> you get an ERROR, and that's one of the selling points of PostgreSQL. >> PostgreSQL users regularly beat up other projects for, say, allowing >>

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Mark Dilger
> On Jul 19, 2017, at 9:53 AM, Robert Haas wrote: > > On Mon, Jul 17, 2017 at 6:12 PM, Tom Lane wrote: >> So, thinking about how that would actually work ... the thing to do in >> order to preserve existing on-disk values is to alternate between

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Mark Dilger
> On Jul 19, 2017, at 10:23 AM, Robert Haas wrote: > > On Wed, Jul 19, 2017 at 1:12 PM, Tom Lane wrote: >>> Doesn't this plan amount to breaking pg_upgrade compatibility and >>> hoping that nobody notice? >> >> Well, what we'd need to do is document

Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-07-19 Thread Robins Tharakan
On 20 July 2017 at 05:08, Michael Paquier wrote: > On Wed, Jul 19, 2017 at 8:59 PM, > ​​ > Fabrízio de Royes Mello > > You should add the properly sgml docs for this pg_dumpall change also. > > Tests of pg_dump go to src/bin/pg_dump/t/ and tests for objects in >

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

2017-07-19 Thread Robert Haas
On Sun, Jul 16, 2017 at 7:23 PM, Stephen Frost wrote: >> Refusing to improve LDAP for the users who have no choice seems like a very >> unfriendly thing to do. > > I'm fine with improving LDAP in general, but, as I tried to point out, > having a way to make it easier to

Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-07-19 Thread Michael Paquier
On Wed, Jul 19, 2017 at 8:59 PM, Fabrízio de Royes Mello wrote: > On Wed, Jul 19, 2017 at 3:54 PM, Robins Tharakan wrote: >> You may want to consider this patch (attached) which additionally has the >> pg_dumpall changes. >> It would be great if you

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Michael Paquier
On Wed, Jul 19, 2017 at 8:56 PM, Tom Lane wrote: > I wonder if it'd be worth the trouble to stick something like this into > xlog.c: > > /* > * For reliability's sake, it's critical that pg_control updates > * be atomic writes. That generally means

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 2:29 PM, Mark Rofail wrote: > On Wed, Jul 19, 2017 at 7:28 PM, Robert Haas wrote: >> >> Why do we have to solve that limitation? > > Since the regress test labled element_foreing_key fails now that I made the > RI queries

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

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 12:24 AM, Rafia Sabih wrote: > On testing this patch for TPC-H (for scale factor 20) benchmark I found a > regression for Q21, on head it was taking some 600 seconds and with this > patch it is taking 3200 seconds. This comparison is on the

Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-07-19 Thread Fabrízio de Royes Mello
On Wed, Jul 19, 2017 at 3:54 PM, Robins Tharakan wrote: > > > On 18 July 2017 at 23:55, David Fetter wrote: >> >> Excellent point about pg_dumpall. I'll see what I can draft up in the >> next day or two and report back. > > > > Hi David, > > You may want to

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Tom Lane
I wrote: > Hm. Currently sizeof(struct ControlFileData) = 296, at least on my > machine. Letting it grow past 512 would be problematic. It's hard > to see getting to that any time soon, though; we don't add fields > there often. I wonder if it'd be worth the trouble to stick something like

Re: [HACKERS] Patch: Add --no-comments to skip COMMENTs with pg_dump

2017-07-19 Thread Robins Tharakan
On 18 July 2017 at 23:55, David Fetter wrote: > > Excellent point about pg_dumpall. I'll see what I can draft up in the > next day or two and report back. ​Hi David, You may want to consider this patch (attached) which additionally has the pg_dumpall changes. It would be

Re: [HACKERS] Pluggable storage

2017-07-19 Thread Peter Geoghegan
On Wed, Jul 19, 2017 at 10:56 AM, Robert Haas wrote: >> I strongly agree. I simply don't understand how you can adopt UNDO for >> MVCC, and yet expect to get a benefit commensurate with the effort >> without also implementing "retail index tuple deletion" first. > > I agree

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Tom Lane
Robert Haas writes: > On Wed, Jul 19, 2017 at 1:35 PM, Tom Lane wrote: >> Alternatively, we could turn the origin point for abstime into >> pg_control field, and regard changing it as a reason for a database >> not being pg_upgrade'able unless it lacks

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-19 Thread Mark Rofail
On Wed, Jul 19, 2017 at 7:28 PM, Robert Haas wrote: > Why do we have to solve that limitation? Since the regress test labled element_foreing_key fails now that I made the RI queries utilise @(anyarray, anyelement), that means it's not functioning as it is meant to be.

Re: [HACKERS] Using non-sequential timelines in order to help with possible collisions

2017-07-19 Thread Michael Paquier
On Wed, Jul 19, 2017 at 8:05 PM, Tom Lane wrote: > Michael Paquier writes: >> On Wed, Jul 19, 2017 at 7:00 PM, Robert Haas wrote: >>> It's interesting that you bring this up. I've also wondered why we >>> don't use random

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 1:35 PM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Jul 19, 2017 at 1:12 PM, Tom Lane wrote: >>> I'd definitely be on board with just dropping the type altogether despite >>> Mark's concern. > >> Then I

Re: [HACKERS] PG10b2: column-list UPDATE syntax fails with single column

2017-07-19 Thread Tom Lane
Justin Pryzby writes: > ts=# begin; UPDATE eric_enodeb_201707 SET > (pmhdelayvarbest50pct,pmlicconnecteduserstimecong)=(0,0) ; > BEGIN > UPDATE 3 > ts=# begin; UPDATE eric_enodeb_201707 SET (pmhdelayvarbest50pct)=(0) ; > BEGIN > ERROR: source for a multiple-column UPDATE

Re: [HACKERS] pl/perl extension fails on Windows

2017-07-19 Thread Tom Lane
Ashutosh Sharma writes: > On Wed, Jul 19, 2017 at 9:42 PM, Tom Lane wrote: >> I imagine the route to a solution is to fix things so that the relevant >> macros are all defined correctly in both cases. But why they aren't >> already is certainly an

Re: [HACKERS] Using non-sequential timelines in order to help with possible collisions

2017-07-19 Thread Tom Lane
Michael Paquier writes: > On Wed, Jul 19, 2017 at 7:00 PM, Robert Haas wrote: >> It's interesting that you bring this up. I've also wondered why we >> don't use random TLIs. I suppose I'm internally assuming that it's >> because the people who

Re: [HACKERS] Pluggable storage

2017-07-19 Thread Robert Haas
On Sat, Jul 15, 2017 at 8:58 PM, Peter Geoghegan wrote: > To repeat myself, for emphasis: *Not all bloat is equal*. +1. > I strongly agree. I simply don't understand how you can adopt UNDO for > MVCC, and yet expect to get a benefit commensurate with the effort > without also

Re: [HACKERS] Pluggable storage

2017-07-19 Thread Robert Haas
On Sat, Jul 15, 2017 at 6:36 PM, Alexander Korotkov wrote: > I think in general there are two ways dealing with out index AM API > limitation. One of them is to extend index AM API. That's pretty much what I have in mind. I think it's likely that if we end up with,

[HACKERS] PG10b2: column-list UPDATE syntax fails with single column

2017-07-19 Thread Justin Pryzby
In testing our application with PG10beta2, I discovered that our use of UPDATE broke, apparently by this commit |commit 906bfcad7ba7cb3863fe0e2a7810be8e3cd84fbd |Author: Tom Lane |Date: Tue Nov 22 15:19:57 2016 -0500 | |Improve handling of "UPDATE ... SET (column_list)

Re: [HACKERS] pl/perl extension fails on Windows

2017-07-19 Thread Ashutosh Sharma
On Wed, Jul 19, 2017 at 9:42 PM, Tom Lane wrote: > > Ashutosh Sharma writes: > > Actually the function used for generation of handshake Key i.e HS_KEYp() > > considers 'sizeof(PerlInterpreter)' to generate the key and somehow the > > sizeof

Re: [HACKERS] Using non-sequential timelines in order to help with possible collisions

2017-07-19 Thread Michael Paquier
On Wed, Jul 19, 2017 at 7:00 PM, Robert Haas wrote: > On Wed, Jul 19, 2017 at 11:23 AM, Brian Faherty > wrote: >> I was working with replication and recovery the other day and noticed that >> there were scenarios where I could cause multiple

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Tom Lane
Robert Haas writes: > On Wed, Jul 19, 2017 at 1:12 PM, Tom Lane wrote: >> I'd definitely be on board with just dropping the type altogether despite >> Mark's concern. > Then I vote for that option. BTW, another possible compromise is to move abstime

Re: [HACKERS] Cache lookup errors with functions manipulation object addresses

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 2:25 AM, Michael Paquier wrote: > Would we want to improve the error handling of such objects? +1 for such an improvement. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 8:08 AM, Mark Rofail wrote: > To summarise, the options we have to solve the limitation of the @>(anyarray > , anyelement) where it produces the following error: operator does not > exist: integer[] @> smallint Why do we have to solve that

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 1:12 PM, Tom Lane wrote: >> Doesn't this plan amount to breaking pg_upgrade compatibility and >> hoping that nobody notice? > > Well, what we'd need to do is document that the type is only meant to be > used to store dates within say +/- 30 years from

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread David Fetter
On Wed, Jul 19, 2017 at 01:12:02PM -0400, Tom Lane wrote: > Robert Haas writes: > > On Mon, Jul 17, 2017 at 6:12 PM, Tom Lane wrote: > >> So, thinking about how that would actually work ... the thing to do in > >> order to preserve existing on-disk

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Tom Lane
Robert Haas writes: > On Mon, Jul 17, 2017 at 6:12 PM, Tom Lane wrote: >> So, thinking about how that would actually work ... the thing to do in >> order to preserve existing on-disk values is to alternate between signed >> and unsigned interpretations

Re: [HACKERS] [TRAP: FailedAssertion] causing server to crash

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 8:26 AM, Neha Sharma wrote: > I am getting FailedAssertion while executing the attached script.However,I > am not able to produce the core dump for the same,the script runs in > background and takes around a day time to produce the mentioned

Re: [HACKERS] Using non-sequential timelines in order to help with possible collisions

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 11:23 AM, Brian Faherty wrote: > Hey hackers, > I was working with replication and recovery the other day and noticed that > there were scenarios where I could cause multiple servers to enter the same > timeline while possibly having

Re: [HACKERS] new function for tsquery creartion

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 12:43 PM, Victor Drobny wrote: > Let me introduce new function for full text search query creation(which is > called 'queryto_tsquery'). It takes 'google like' query string and > translates it to tsquery. I haven't looked at the code, but that

Re: [HACKERS] pl/perl extension fails on Windows

2017-07-19 Thread Robert Haas
On Wed, Jul 19, 2017 at 12:12 PM, Tom Lane wrote: > Ashutosh Sharma writes: >> Actually the function used for generation of handshake Key i.e HS_KEYp() >> considers 'sizeof(PerlInterpreter)' to generate the key and somehow the >> sizeof PerlInterpreter

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Robert Haas
On Mon, Jul 17, 2017 at 6:12 PM, Tom Lane wrote: > So, thinking about how that would actually work ... the thing to do in > order to preserve existing on-disk values is to alternate between signed > and unsigned interpretations of abstimes. That is, right now, abstime > is

[HACKERS] new function for tsquery creartion

2017-07-19 Thread Victor Drobny
Dear all, Now Postgres has a few functions to create tsqueries for full text search. The main one is the to_tsquery function that allows to make query with any operation. But to make correct query all of the operators should be specified explicitly. In order to make it easier postgres has

Re: [HACKERS] tupconvert.c API change in v10 release notes

2017-07-19 Thread Tom Lane
Justin Pryzby writes: > FYI, I happened across this commit comment: > 3f902354b08ac788600f0ae54fcbfc1d4e3ea765 > | So, let's accept the removal of the guarantee about > | the output tuple's rowtype marking, recognizing that this is a API change > | that could

[HACKERS] tupconvert.c API change in v10 release notes

2017-07-19 Thread Justin Pryzby
FYI, I happened across this commit comment: 3f902354b08ac788600f0ae54fcbfc1d4e3ea765 | So, let's accept the removal of the guarantee about | the output tuple's rowtype marking, recognizing that this is a API change | that could conceivably break third-party callers of tupconvert.c. (So, |

Re: [HACKERS] pl/perl extension fails on Windows

2017-07-19 Thread Tom Lane
Ashutosh Sharma writes: > Actually the function used for generation of handshake Key i.e HS_KEYp() > considers 'sizeof(PerlInterpreter)' to generate the key and somehow the > sizeof PerlInterpreter is not uniform in plperl and perl modules incase of > Windows but on Linux

[HACKERS] Using non-sequential timelines in order to help with possible collisions

2017-07-19 Thread Brian Faherty
Hey hackers, I was working with replication and recovery the other day and noticed that there were scenarios where I could cause multiple servers to enter the same timeline while possibly having divergent data. One such scenario is Master A and Replica B are both on timeline 1. There is an event

Re: [HACKERS] pl/perl extension fails on Windows

2017-07-19 Thread Ashutosh Sharma
On Thu, Jul 13, 2017 at 10:30 PM, Tom Lane wrote: > Andrew Dunstan writes: >> It would be nice to get to the bottom of why we're getting a version >> mismatch on Windows, since we're clearly not getting one on Linux. > > Yeah, that's what's

Re: [HACKERS] JSONB - JSONB operator feature request

2017-07-19 Thread david . turon
Hi, hstore have only key-value pairs, but in json can have same behavior - only equal objects are removed: SELECT '{"a": 1, "b": {"c": 2}}'::JSONB - '{"a": 1, "b": {"c": 3}}'::JSONB '{"b": {"c": 2}}' SELECT '{"a": 1, "b": {"c": 2}}'::JSONB - '{"a": 2, "b": {"c": 2}}'::JSONB '{"a": 1}'

Re: [HACKERS] merge psql ef/ev sf/sv handling functions

2017-07-19 Thread Fabien COELHO
While reviewing Corey's \if patch, I complained that there was some amount of copy-paste in "psql/command.c". Here is an attempt at merging some functions which removes 160 lines of code. Thank you for the patch. Is this an item for PG11? Yep. -- Fabien. -- Sent via pgsql-hackers

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-07-19 Thread Tom Lane
Etsuro Fujita writes: > * Modified rewrite_targetlist(), which is a new function added to > preptlist.c, so that we do const-simplification to junk TLEs that > AddForeignUpdateTargets() added, as that API allows the FDW to add junk > TLEs containing non-Var

Re: [HACKERS] [WIP] Zipfian distribution in pgbench

2017-07-19 Thread Fabien COELHO
Hello Alik, I am attaching patch v3. Among other things I fixed small typo in description of random_exponential function in pgbench.sgml file. Ok. Probably this typo should be committed separatly and independently. A few comments about v3: Patch applies cleanly, compiles, works. About

Re: [HACKERS] Proposal for CSN based snapshots

2017-07-19 Thread Alexander Kuzmenkov
That's not actually a problem as I am reusing an older v4 from Heikki now for the future, but I wanted to let you know about that first. Thank you, I'll look into that. -- Alexander Kuzmenkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via

Re: [HACKERS] Something for the TODO list: deprecating abstime and friends

2017-07-19 Thread Tom Lane
Mark Dilger writes: >> On Jul 18, 2017, at 9:13 PM, Mark Dilger wrote: >> There was not much conversation about this, so I went ahead with what >> I think makes a logical first step. The attached patch removes the tinterval >> datatype from the

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-19 Thread Mark Rofail
*To summarise,* the options we have to solve the limitation of the @>(anyarray , anyelement) where it produces the following error: operator does not exist: integer[] @> smallint *Option 1: *Multiple Operators Have separate operators for every combination of datatypes instead of a single

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-07-19 Thread Mark Rofail
On Tue, Jul 18, 2017 at 11:14 PM, Alvaro Herrera wrote: > > Why did we add an operator and not a support > procedure? I thought the support procedures were constant within an opclass. They implement the mandotary function required of an opclass. I don't see why we

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-07-19 Thread Etsuro Fujita
On 2017/07/13 21:10, Etsuro Fujita wrote: Attached is an updated version of the patch. Here is an updated version of the patch. Changes are: * Modified rewrite_targetlist(), which is a new function added to preptlist.c, so that we do const-simplification to junk TLEs that

[HACKERS] Dealing with logical replication

2017-07-19 Thread Tatsuo Ishii
Now that we are going to have logical replication in PostgreSQL 10, I have started thinking how Pgpool-II can deal with it. For example, the logical replication does not replicate DDLs. Isn't it convenient for users to do it automatically in Pgpool-II? Or even doing it for TRUNCATE? Or are they

[HACKERS] Cache lookup errors with functions manipulation object addresses

2017-07-19 Thread Michael Paquier
Hi all, Per an offline report from Moshe Jacobson, it is possible to trigger easily cache lookup errors using pg_describe_object with invalid object IDs and pg_describe_object(). I had a closer look at things in this area, to notice that there are other user-facing failures as many things use the

Re: [HACKERS] merge psql ef/ev sf/sv handling functions

2017-07-19 Thread Masahiko Sawada
On Wed, Jul 19, 2017 at 2:41 PM, Fabien COELHO wrote: > >>> While reviewing Corey's \if patch, I complained that there was some >>> amount >>> of copy-paste in "psql/command.c". >>> >>> Here is an attempt at merging some functions which removes 160 lines of >>> code. >> >> >>

Re: [HACKERS] Pluggable storage

2017-07-19 Thread Haribabu Kommi
On Sat, Jul 15, 2017 at 12:30 PM, Robert Haas wrote: > On Fri, Jul 14, 2017 at 8:35 AM, Haribabu Kommi > wrote: > > To replace tuple with slot, I took trigger and SPI calls as the first > step > > in modifying > > from tuple to slot, Here I