Re: [HACKERS] jsonb_delete with arrays

2016-11-20 Thread Magnus Hagander
On Mon, Nov 21, 2016 at 5:05 AM, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > On 15 November 2016 at 22:53, Magnus Hagander > wrote: > > Attached is an implantation of jsonb_delete that instead of taking a > single key to remove accepts an array of keys (it still does

Re: [HACKERS] Document how to set up TAP tests for Perl 5.8.8

2016-11-20 Thread Michael Paquier
On Mon, Nov 21, 2016 at 3:38 PM, Craig Ringer wrote: > On 21 November 2016 at 12:23, Kyotaro HORIGUCHI > wrote: >> I understand you :p By the way, the new doc points to >> http://install.perlbrew.pl and it just shows the install >> script.

Re: [HACKERS] regression tests fails

2016-11-20 Thread Pavel Stehule
2016-11-21 8:13 GMT+01:00 Pavel Stehule : > > > 2016-11-21 8:09 GMT+01:00 Craig Ringer : > >> On 21 November 2016 at 14:45, Pavel Stehule >> wrote: >> >> > SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*), >> >

Re: [HACKERS] regression tests fails

2016-11-20 Thread Pavel Stehule
2016-11-21 8:09 GMT+01:00 Craig Ringer : > On 21 November 2016 at 14:45, Pavel Stehule > wrote: > > > SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*), > > (array_agg(data))[1], (array_agg(data))[count(*)] > > FROM

Re: [HACKERS] regression tests fails

2016-11-20 Thread Craig Ringer
On 21 November 2016 at 14:45, Pavel Stehule wrote: > SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*), > (array_agg(data))[1], (array_agg(data))[count(*)] > FROM pg_logical_slot_get_changes('regression_slot', NULL,NULL) WHERE data > ~ 'INSERT' > GROUP BY 1

Re: [HACKERS] regression tests fails

2016-11-20 Thread Pavel Stehule
2016-11-16 5:54 GMT+01:00 Pavel Stehule : > Hi > > I have a repeated problem with regress tests > > master, Fedora 25, > > running on port 50848 with PID 5548 > == creating database "regression" == > CREATE DATABASE > ALTER DATABASE >

Re: [HACKERS] Fix checkpoint skip logic on idle systems by tracking LSN progress

2016-11-20 Thread Kyotaro HORIGUCHI
Hello, At Mon, 21 Nov 2016 14:41:27 +0900, Michael Paquier wrote in > On Mon, Nov 21, 2016 at 1:31 PM, Kyotaro HORIGUCHI > wrote: > > So, all my original concern

Re: [HACKERS] Document how to set up TAP tests for Perl 5.8.8

2016-11-20 Thread Craig Ringer
On 21 November 2016 at 12:23, Kyotaro HORIGUCHI wrote: > Hello, > > At Mon, 21 Nov 2016 11:58:34 +0800, Craig Ringer > wrote in >> On 18 November 2016 at 08:15, Craig

Re: [HACKERS] Floating point comparison inconsistencies of the geometric types

2016-11-20 Thread Kyotaro HORIGUCHI
Hello, # Sorry for a trash I emitted before.. Perhaps you don't assume any calculations applied on stored geo-type values. Please be patient to disucuss with me. (Sorry for perhas hard-to-read English..) At Fri, 18 Nov 2016 10:58:27 +0100, Emre Hasegeli wrote in

Re: [HACKERS] Fix checkpoint skip logic on idle systems by tracking LSN progress

2016-11-20 Thread Michael Paquier
On Mon, Nov 21, 2016 at 1:31 PM, Kyotaro HORIGUCHI wrote: > So, all my original concern were cleared. Cool. Perhaps this could be marked as ready for committer then? > The last one is > resetting by a checkpointer restart.. I'd like to remove that if > Andres

Re: [HACKERS] Fix checkpoint skip logic on idle systems by tracking LSN progress

2016-11-20 Thread Michael Paquier
On Tue, Nov 15, 2016 at 9:59 PM, Amit Kapila wrote: > On Tue, Nov 15, 2016 at 9:27 AM, Kyotaro HORIGUCHI > wrote: >> The term "WAL activity' is used in the comment for >> GetProgressRecPtr. Its meaning is not clear but not well >>

Re: [HACKERS] Tuple count used while costing MergeAppend and that for an append rel

2016-11-20 Thread Ashutosh Bapat
> > AFAICS, what you propose to add in set_append_rel_size is pure overhead. > There's no conceivable use to computing sum-of-raw-tuple-counts for an > appendrel ... or at least, if there is, you didn't say what you expect > it would be good for. Normally the difference between rel->tuples and >

Re: [HACKERS] Fix checkpoint skip logic on idle systems by tracking LSN progress

2016-11-20 Thread Kyotaro HORIGUCHI
Thank you very much for the testing on the nice machine. At Fri, 18 Nov 2016 20:35:43 -0800, Michael Paquier wrote in

Re: [HACKERS] Document how to set up TAP tests for Perl 5.8.8

2016-11-20 Thread Kyotaro HORIGUCHI
Hello, At Mon, 21 Nov 2016 11:58:34 +0800, Craig Ringer wrote in > On 18 November 2016 at 08:15, Craig Ringer wrote: > > On 18 November 2016 at 07:10, Michael Paquier

Re: [HACKERS] DECLARE STATEMENT setting up a connection in ECPG

2016-11-20 Thread Ideriha, Takeshi
Thank you for your comment. Friday, November 18, 2016 4:45 AM Michael Meskes wrote : > > - Translate the DECLARE STATEMENT into a new function with parameters. > >These parameters carry the information like connection_name and > statement_name. > > - The function is a new function defined

Re: [HACKERS] pg_recvlogical --endpos

2016-11-20 Thread Craig Ringer
On 19 November 2016 at 10:04, Euler Taveira wrote: > On 01-09-2016 01:41, Craig Ringer wrote: >> Here's a rebased version of my pg_recvlogical --endpos patch from the >> 9.5 series, updated to incoroprate Álvaro's changes. >> > I should review this patch in the other

Re: [HACKERS] jsonb_delete with arrays

2016-11-20 Thread Dmitry Dolgov
> On 15 November 2016 at 22:53, Magnus Hagander wrote: > Attached is an implantation of jsonb_delete that instead of taking a single key to remove accepts an array of keys (it still does just keys, so it's using the - operator, it's not like the path delete function that also

Re: [HACKERS] Document how to set up TAP tests for Perl 5.8.8

2016-11-20 Thread Craig Ringer
On 18 November 2016 at 08:15, Craig Ringer wrote: > On 18 November 2016 at 07:10, Michael Paquier > wrote: >> On Thu, Nov 17, 2016 at 2:39 PM, Craig Ringer wrote: >>> I wasted a bunch of time getting set up to test for

Re: [HACKERS] Fun fact about autovacuum and orphan temp tables

2016-11-20 Thread Michael Paquier
On Sat, Nov 19, 2016 at 2:16 PM, Michael Paquier wrote: > On Fri, Nov 18, 2016 at 1:11 PM, Robert Haas wrote: >> That might sound adding unnecessary work just for the sake of >> paranoia, but I don't think it is. Failures here won't be common,

Re: [HACKERS] WAL recycle retading based on active sync rep.

2016-11-20 Thread Kyotaro HORIGUCHI
Hello, At Fri, 18 Nov 2016 10:16:22 -0800, Andres Freund wrote in <20161118181622.hklschaizwaxo...@alap3.anarazel.de> > Hi, > > On 2016-11-18 14:12:42 +0900, Kyotaro HORIGUCHI wrote: > > We had too-early WAL recycling during a test we had on a sync > > replication set. This

Re: [HACKERS] [RFC] Should we fix postmaster to avoid slow shutdown?

2016-11-20 Thread Tsunakawa, Takayuki
From: Robert Haas [mailto:robertmh...@gmail.com] > On Fri, Nov 18, 2016 at 4:12 PM, Tom Lane wrote: > > Alvaro Herrera writes: > >> Tom Lane wrote: > >>> IMO it's not, and closer analysis says that this patch series is an > >>> attempt to solve

Re: [HACKERS] WAL recycle retading based on active sync rep.

2016-11-20 Thread Kyotaro HORIGUCHI
Thanks for the comment. At Fri, 18 Nov 2016 17:06:55 +0800, Craig Ringer wrote in > > We had too-early WAL recycling during a test we had on a sync > > replication set. This is not a bug and a bit

Re: [HACKERS] Remove the comment on the countereffectiveness of large shared_buffers on Windows

2016-11-20 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Amit Kapila > > shared_buffers tps > > 256MB 990 > > 512MB 813 > > 1GB 1189 > > 2GB 2258 > > 4GB 5003 > > 8GB 5062 > > > > "512MB is the largest effective size" seems to be a superstition,

Re: [HACKERS] Remove the comment on the countereffectiveness of large shared_buffers on Windows

2016-11-20 Thread Amit Kapila
On Mon, Nov 21, 2016 at 5:22 AM, Tsunakawa, Takayuki wrote: > From: Tsunakawa, Takayuki/綱川 貴之 >> Thank you, I'll try the read-write test with these settings on the weekend, >> when my PC is available. I understood that your intention is to avoid being >> affected

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-11-20 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Robert Haas > On Thu, Nov 17, 2016 at 10:08 PM, Craig Ringer > wrote: > > We can and probably should have both. > > > > If the server tells us on connect whether it's a

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-11-20 Thread Tsunakawa, Takayuki
From: Mithun Cy [mailto:mithun...@enterprisedb.com] > > + {"target_server_type", "PGTARGETSERVERTYPE", > DefaultTargetServerType, NULL, > > + "Target-Server-Type", "", 6, > > Thanks fixed. + {"target_server_type", "PGTARGETSERVERTYPE", NULL, NULL, The default value

[HACKERS] dblink get_connect_string() passes FDW option "updatable" to the connect string, connection fails.

2016-11-20 Thread Corey Huinker
I ran into this today: select current_database() as current_db \gset CREATE EXTENSION postgres_fdw; CREATE EXTENSION CREATE EXTENSION dblink; CREATE EXTENSION CREATE ROLE bob LOGIN PASSWORD 'bob'; CREATE ROLE CREATE SERVER bob_srv FOREIGN DATA WRAPPER postgres_fdw OPTIONS ( host 'localhost',

Re: [HACKERS] Remove the comment on the countereffectiveness of large shared_buffers on Windows

2016-11-20 Thread Tsunakawa, Takayuki
From: Tsunakawa, Takayuki/綱川 貴之 > Thank you, I'll try the read-write test with these settings on the weekend, > when my PC is available. I understood that your intention is to avoid being > affected by checkpointing and WAL segment creation. The result looks nice as follows. I took the mean

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-11-20 Thread Robert Haas
On Sat, Nov 19, 2016 at 11:38 PM, Peter Geoghegan wrote: > On Sat, Nov 19, 2016 at 6:45 PM, Robert Haas wrote: >>> What do you think about new argument with default vs. GUC? I guess >>> that the GUC might be a lot less of a foot-gun. We might even give it

Re: [HACKERS] Mail thread references in commits

2016-11-20 Thread Andrew Dunstan
On 11/20/2016 11:34 AM, Magnus Hagander wrote: I'm prepared to go along with this if there's general agreement. However, maybe we should make it actually work first, because I get a 404 from http://postgr.es/m/29df5b73-d823-ade4-cb17-47142742a...@dunslane.net

Re: [HACKERS] Logical Replication WIP

2016-11-20 Thread Steve Singer
On Sun, 20 Nov 2016, Petr Jelinek wrote: On 13/11/16 23:02, Steve Singer wrote: There is one exception though: *** 195,214 A conflict will produce an error and will stop the replication; it ! must be resolved manually by the user. ! The resolution can

Re: [HACKERS] Logical Replication WIP

2016-11-20 Thread Petr Jelinek
On 13/11/16 23:02, Steve Singer wrote: > On 10/31/2016 06:38 AM, Petr Jelinek wrote: >> On 31/10/16 00:52, Steve Singer wrote: >> There are some fundamental issues with initial sync that need to be >> discussed on list but this one is not known. I'll try to convert this >> to test case (seems like

Re: [HACKERS] Mail thread references in commits

2016-11-20 Thread Vik Fearing
On 11/20/2016 03:59 PM, Andrew Dunstan wrote: > > On 11/20/2016 06:55 AM, Magnus Hagander wrote: >> >> We can replace the website part with a http://postgr.es/m/ >> which will make it a bit shorter and still as easy to generate from >> the client side and to search off. It'd be trivial to do, and

[HACKERS] [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan

2016-11-20 Thread Andreas Seltenreich
Hi, the query below triggers a parallel worker assertion for me when run on the regression database of master as of 0832f2d. The plan sports a couple of InitPlan nodes below Gather. regards, Andreas Gather (cost=1.64..84.29 rows=128 width=4) Workers Planned: 1 Single Copy: true ->

Re: [HACKERS] How to change order sort of table in HashJoin

2016-11-20 Thread Tom Lane
Man writes: > Additional information. > In 9.6 the second table (lesser tuple) was choosen (the same testdata). > There are something (cost estimation?) different in previous versions. I'd bet on different statistics in the two installations (either you forgot to ANALYZE,

Re: [HACKERS] Mail thread references in commits

2016-11-20 Thread Magnus Hagander
On Sun, Nov 20, 2016 at 5:26 PM, Tom Lane wrote: > Andrew Dunstan writes: > > On 11/20/2016 06:55 AM, Magnus Hagander wrote: > >> We can replace the website part with a http://postgr.es/m/ > >> which will make it a bit shorter and still as easy to

Re: [HACKERS] Mail thread references in commits

2016-11-20 Thread Tom Lane
Andrew Dunstan writes: > On 11/20/2016 06:55 AM, Magnus Hagander wrote: >> We can replace the website part with a http://postgr.es/m/ >> which will make it a bit shorter and still as easy to generate from >> the client side and to search off. > That's 19 extra characters,

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-11-20 Thread Mithun Cy
On Fri, Nov 18, 2016 at 6:39 AM, Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com> wrote: >Typo. , and "observering" -> "observing". Thanks fixed. > + {"target_server_type", "PGTARGETSERVERTYPE", DefaultTargetServerType, NULL, > + "Target-Server-Type", "", 6, Thanks

Re: [HACKERS] Mail thread references in commits

2016-11-20 Thread Magnus Hagander
On Sun, Nov 20, 2016 at 3:59 PM, Andrew Dunstan wrote: > > > On 11/20/2016 06:55 AM, Magnus Hagander wrote: > >> >> >> We can replace the website part with a http://postgr.es/m/ >> which will make it a bit shorter and still as easy to generate from the >> client side and to

Re: [HACKERS] Mail thread references in commits

2016-11-20 Thread Andrew Dunstan
On 11/20/2016 06:55 AM, Magnus Hagander wrote: We can replace the website part with a http://postgr.es/m/ which will make it a bit shorter and still as easy to generate from the client side and to search off. It'd be trivial to do, and since there is no state held at the forwarder for it,

[HACKERS] [patch] psql tab completion for ALTER DEFAULT PRIVILEGES

2016-11-20 Thread Gilles Darold
Hi, When tab-completing after ALTER DEFAULT PRIVILEGES ... GRANT|REVOKE, currently psql injects completion from the GRANT|REVOKE order, rather than the one expected. A patch is attached. It adds the right completion to GRANT|REVOKE after ALTER DEFAULT PRIVILEGES and after FOR ROLE|USER + IN

[HACKERS] [sqlsmith] Parallel worker crash on seqscan

2016-11-20 Thread Andreas Seltenreich
Hi, the following query appears to reliably crash parallel workers on master as of 0832f2d. --8<---cut here---start->8--- set max_parallel_workers_per_gather to 2; set force_parallel_mode to 1; select subq.context from pg_settings, lateral (select context

Re: [HACKERS] Mail thread references in commits

2016-11-20 Thread Magnus Hagander
On Sat, Nov 19, 2016 at 5:38 PM, Tom Lane wrote: > Andrew Dunstan writes: > > On 11/19/2016 10:11 AM, Stephen Frost wrote: > >> That's actually not the case if we use a hash, because the client could > >> figure out what the hash is before sending it. >

Re: [HACKERS] How to change order sort of table in HashJoin

2016-11-20 Thread Man
Thanks for response, sir. On 11/20/2016 1:18 AM, Tom Lane wrote: Man Trieu writes: As in the example below, i think the plan which hash table is created on testtbl2 (the fewer tuples) should be choosen. The planner usually prefers to hash on the table that has a flatter

Re: [HACKERS] [PATCH] pgpassfile connection option

2016-11-20 Thread Fabien COELHO
Hello Julian, I've updated my patch to work with the changes introduced to libpq by allowing multiple hosts. Ok. Patch applies cleanly, compiles & checks (although yet again the feature is not tested). Feature tested and works for me, although I'm not sure how the multi-host warning