[HACKERS] Migration to pglister - Before

2017-11-13 Thread Stephen Frost
Greetings, We will be migrating these lists to pglister in the next few minutes. This final email on the old list system is intended to let you know that future emails will have different headers and you will need to adjust your filters. The changes which we expect to be most significant to user

Re: [HACKERS] UPDATE of partition key

2017-11-13 Thread David Rowley
;); CREATE TABLE P_false PARTITION OF p FOR VALUES IN('f'); INSERT INTO p VALUES('t', 10); SELECT tableoid::regclass,oid,a FROM p; tableoid | oid | a --+---+--- p_true | 16792 | t (1 row) UPDATE p SET a = 'f'; -- partition-key-UPDATE (oid has changed (it probably shouldn't have)) SELECT tableoid::regclass,oid,a FROM p; tableoid | oid | a --+---+--- p_false | 16793 | f (1 row) UPDATE p SET b = 20; -- non-partition-key-UPDATE (oid remains the same) SELECT tableoid::regclass,oid,a FROM p; tableoid | oid | a --+---+--- p_false | 16793 | f (1 row) I'll try to continue with the review tomorrow, but I think some other reviews are also looming too. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Parallel Hash take II

2017-11-13 Thread Thomas Munro
Hi Andres and Peter, Please see below for inline responses to your feedback. New patch attached. On Wed, Nov 8, 2017 at 10:01 AM, Andres Freund wrote: > +set min_parallel_table_scan_size = 0; > +set parallel_setup_cost = 0; > +-- Make a simple relation with well distributed keys and correctly >

Re: [HACKERS] proposal: schema variables

2017-11-13 Thread Pavel Stehule
Hi 2017-11-13 13:15 GMT+01:00 Pavel Golub : > Hello, Pavel. > > You wrote: > > PS> Hi, > > PS> I propose a new database object - a variable. The variable is > PS> persistent object, that holds unshared session based not > PS> transactional in memory value of any type. Like variables in any > PS>

Re: [HACKERS] proposal: schema variables

2017-11-13 Thread Pavel Golub
rameters are allowed. PS> I hope so this proposal is good enough and simple. PS> Comments, notes? PS> regards PS> Pavel -- With best wishes, Pavel mailto:pa...@gf.microolap.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Fix bloom WAL tap test

2017-11-13 Thread Alexander Korotkov
Hi! On Fri, Nov 10, 2017 at 9:12 PM, Tom Lane wrote: > I wrote: > > Is there anything we can do to cut the runtime of the TAP test to > > the point where running it by default wouldn't be so painful? > > As an experiment, I tried simply cutting the size of the test table 10X: > > diff --git a/co

Re: [HACKERS] How to implement a SP-GiST index as a extension module?

2017-11-13 Thread Alexander Korotkov
Hi! On Mon, Nov 13, 2017 at 6:47 AM, Connor Wolf wrote: > Ok, I've managed to get my custom index working. > Good! It's all on github here: https://github.com/fake-name/pg-spgist_hamming, if > anyone else needs a fuzzy-image searching system > that can integrate into postgresql.. > > It should

Re: [HACKERS] Jsonb transform for pl/python

2017-11-13 Thread Anthony Bykov
CT back('[true]'::jsonb); +SELECT back('["string"]'::jsonb); +SELECT back('[null,1]'::jsonb); +SELECT back('[1,true]'::jsonb); +SELECT back('[true,"string"]'::jsonb); +SELECT back('["string","string2"]'::jsonb); + + +DROP EXTENSION plpythonu CASCADE; diff --git a/contrib/jsonb_plpython/sql/jsonb_plpython3.sql b/contrib/jsonb_plpython/sql/jsonb_plpython3.sql new file mode 100644 index 000..eaddf9a --- /dev/null +++ b/contrib/jsonb_plpython/sql/jsonb_plpython3.sql @@ -0,0 +1,129 @@ +CREATE EXTENSION jsonb_plpython3u CASCADE; + +-- test jsonb -> python dict +CREATE FUNCTION test1(val jsonb) RETURNS int +LANGUAGE plpython3u +TRANSFORM FOR TYPE jsonb +AS $$ +assert isinstance(val, dict) +plpy.info(sorted(val.items())) +return len(val) +$$; + +SELECT test1('{"a":1, "c":"NULL"}'::jsonb); + +-- test jsonb -> python dict +-- complex dict with dicts as value +CREATE FUNCTION test1complex(val jsonb) RETURNS int +LANGUAGE plpython3u +TRANSFORM FOR TYPE jsonb +AS $$ +assert isinstance(val, dict) +assert(val == {"d":{"d": 1}}) +return len(val) +$$; + +SELECT test1complex('{"d":{"d": 1}}'::jsonb); + + +-- test jsonb[] -> python dict +-- dict with array as value +CREATE FUNCTION test1arr(val jsonb) RETURNS int +LANGUAGE plpython3u +TRANSFORM FOR TYPE jsonb +AS $$ +assert isinstance(val, dict) +assert(val == {"d": [12,1]}) +return len(val) +$$; + +SELECT test1arr('{"d":[12,1]}'::jsonb); + +-- test jsonb[] -> python list +-- simple list +CREATE FUNCTION test2arr(val jsonb) RETURNS int +LANGUAGE plpython3u +TRANSFORM FOR TYPE jsonb +AS $$ +assert isinstance(val, list) +assert(val == [12,1]) +return len(val) +$$; + +SELECT test2arr('[12,1]'::jsonb); + +-- test jsonb[] -> python list +-- array of dicts +CREATE FUNCTION test3arr(val jsonb) RETURNS int +LANGUAGE plpython3u +TRANSFORM FOR TYPE jsonb +AS $$ +assert isinstance(val, list) +assert(val == [{"a":1,"b":2},{"c":3,"d":4}]) +return len(val) +$$; + +SELECT test3arr('[{"a":1,"b":2},{"c":3,"d":4}]'::jsonb); + +-- test jsonb int -> python int +CREATE FUNCTION test1int(val jsonb) RETURNS int +LANGUAGE plpython3u +TRANSFORM FOR TYPE jsonb +AS $$ +assert(val == [1]) +return len(val) +$$; + +SELECT test1int('1'::jsonb); + +-- test jsonb string -> python string +CREATE FUNCTION test1string(val jsonb) RETURNS int +LANGUAGE plpython3u +TRANSFORM FOR TYPE jsonb +AS $$ +assert(val == ["a"]) +return len(val) +$$; + +SELECT test1string('"a"'::jsonb); + +-- test jsonb null -> python None +CREATE FUNCTION test1null(val jsonb) RETURNS int +LANGUAGE plpython3u +TRANSFORM FOR TYPE jsonb +AS $$ +assert(val == None) +return val==None +$$; + +SELECT test1null('"a"'::jsonb); + +-- test python -> jsonb +CREATE FUNCTION back(val jsonb) RETURNS jsonb +LANGUAGE plpython3u +TRANSFORM FOR TYPE jsonb +as $$ +return val +$$; + +SELECT back('null'::jsonb); +SELECT back('1'::jsonb); +SELECT back('true'::jsonb); +SELECT back('"string"'::jsonb); + +SELECT back('{"1":null}'::jsonb); +SELECT back('{"1":1}'::jsonb); +SELECT back('{"1":true}'::jsonb); +SELECT back('{"1":"string"}'::jsonb); + +SELECT back('[null]'::jsonb); +SELECT back('[1]'::jsonb); +SELECT back('[true]'::jsonb); +SELECT back('["string"]'::jsonb); +SELECT back('[null,1]'::jsonb); +SELECT back('[1,true]'::jsonb); +SELECT back('[true,"string"]'::jsonb); +SELECT back('["string","string2"]'::jsonb); + + +DROP EXTENSION plpython3u CASCADE; diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml index 05ecef2..4e8a7a0 100644 --- a/doc/src/sgml/json.sgml +++ b/doc/src/sgml/json.sgml @@ -569,4 +569,20 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"tags": ["qu compared using the default database collation. + + Transforms + + + Additional extensions are available that implement transforms for + the jsonb type for the language PL/Python. The + extensions for PL/Python are called + jsonb_plpythonu, jsonb_plpython2u, + and jsonb_plpython3u + (see for the PL/Python naming + convention). If you use them, jsonb values are mapped to + Python dictionaries. + + + + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] path toward faster partition pruning

2017-11-13 Thread Amit Langote
mment. I'd almost started looking around if something might be wrong after all. :) On 2017/11/10 16:07, Kyotaro HORIGUCHI wrote: > At Fri, 10 Nov 2017 14:44:55 +0900, Kyotaro HORIGUCHI wrote: > >>> Those two conditions are not orthogonal. Maybe something like >>> follow

Re: [HACKERS] 10beta1 sequence regression failure on sparc64

2017-11-13 Thread Jonathan Jacobson
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [Patch] Log SSL certificate verification errors

2017-11-13 Thread Laurenz Albe
lp. Yours, Laurenz Albe -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Partition-wise aggregation/grouping

2017-11-13 Thread Konstantin Knizhnik
gregate, > context); > } > > 4866c4909 < if (extra->isPartial) --- > if (extra->isPartial && expression_tree_walker((Node*)extra->pathTarget->exprs, contains_complex_aggregate, NULL)) 5190a5234,5246 > } > > void _PG_init(void) > { > D

Re: [HACKERS] index-only count(*) for indexes supporting bitmap scans

2017-11-13 Thread Alexander Kuzmenkov
to address your comments if I continue working on the planner part. -- Alexander Kuzmenkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgres

[HACKERS] ginInsertCleanup called from vacuum could still miss tuples to be deleted

2017-11-13 Thread Masahiko Sawada
GE_BLKNO, ExclusiveLock)) return; workMemory = work_mem; } Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center fix_ginInsertCleanup.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] Building PL/Perl with ActiveState Perl 5.22 and MSVC

2017-11-12 Thread Noah Misch
t;{options}->{perl} . '\lib\CORE\*perl*'; + # ActivePerl 5.16 provided perl516.lib; 5.18 provided libperl518.a my @perl_libs = - grep { /perl\d+.lib$/ } glob($perl_path); + grep { /perl\d+\.lib$|libperl\d+\.a$/ } glob($perl

Re: [HACKERS] Parallel Append implementation

2017-11-12 Thread Amit Khandekar
approach is that I think it will > produce answers closer to the value we get for an all-partial-paths > append. That's good, because we don't want the row-count estimate to > change precipitously based on whether an all-partial-paths append is > possible. > > - I fixed some whitespace problems by running pgindent on various > files and manually breaking some long lines. > > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company -- Thanks, -Amit Khandekar EnterpriseDB Corporation The Postgres Database Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-11-12 Thread Fabien COELHO
LECT version() AS "SERVER_VERSION" \gset fabien=# \echo :SERVER_VERSION PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609, 64-bit -- Fabien -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to you

Re: [HACKERS] Proposal: Improve bitmap costing for lossy pages

2017-11-12 Thread Dilip Kumar
ment as well: > > I made an adjustment that I hope will address your concern here, made > a few other adjustments, and committed this. > Thanks, Robert. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.or

Re: [HACKERS] How to implement a SP-GiST index as a extension module?

2017-11-12 Thread Connor Wolf
Ok, I've managed to get my custom index working. It's all on github here: https://github.com/fake-name/pg-spgist_hamming, if anyone else needs a fuzzy-image searching system that can integrate into postgresql.. It should be a pretty good basis for anyone else to use if they want to implement a SP

Re: [HACKERS] Incorrect comment for build_child_join_rel

2017-11-12 Thread Etsuro Fujita
(2017/11/11 0:58), Robert Haas wrote: On Fri, Nov 10, 2017 at 4:34 AM, Etsuro Fujita wrote: Here is a small patch for $Subject. Good catch. Committed. Thanks! Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-11-12 Thread Michael Paquier
raw') + AND :'SERVER_VERSION' = :'VERSION' + AS "SERVER_VERSION is consistent"; Not much enthusiastic with this test when thinking about cross-upgrades. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] PATCH: psql tab completion for SELECT

2017-11-12 Thread Michael Paquier
so you should be careful about things like WITH clauses... -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-11-12 Thread Andreas Karlsson
i_triggers.o' failed When building the documentation I got two warnings: /usr/bin/osx:catalogs.sgml:2349:17:W: empty end-tag /usr/bin/osx:catalogs.sgml:2350:17:W: empty end-tag When running the tests I got a failure in element_foreign_key. Andreas -- Sent via pgsql-hackers mailing l

Re: [HACKERS] [bug fix] postgres.exe crashes with access violation on Windows while starting up

2017-11-12 Thread Michael Paquier
oth patches. Thanks for double-checking, Noah. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [bug fix] postgres.exe crashes with access violation on Windows while starting up

2017-11-12 Thread Noah Misch
ly with that restriction today.) On Fri, Nov 03, 2017 at 11:10:14AM +, Michael Paquier wrote: > I am > switching the patch as ready for committer, I definitely agree that > you are taking the write approach here. Committed both patches. -- Sent via pgsql-hackers mailing list (pgsq

Re: [HACKERS] LDAPS

2017-11-12 Thread Thomas Munro
://msdn.microsoft.com/en-us/library/aa366996(v=vs.85).aspx [2] https://msdn.microsoft.com/en-us/library/aa366105(v=vs.85).aspx [3] https://www.postgresql.org/message-id/20080426010240.gs5...@68k.org -- Thomas Munro http://www.enterprisedb.com ldaps-v3.patch Description: Binary data -- Sent via

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-11-12 Thread Tom Lane
application to use it at all, rather than the other version formats we already provide. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] PATCH: psql tab completion for SELECT

2017-11-12 Thread David Fetter
On Mon, Nov 06, 2017 at 05:28:55PM +1300, Edmund Horner wrote: > Hi pgsql-hackers, > > Here's a little draft patch to add *some* tab completion ability for > SELECT in psql. I have often missed the ability, especially with > invocations of utility functions. > > It w

Re: [HACKERS] Row Level Security Bug ?

2017-11-12 Thread Joe Conway
On 11/12/2017 10:17 AM, Andrea Adami wrote: > if i do: > > SET ROLE 'manage...@scuola-1.it ' [SELECT from table] > i see only one row (as expected) > > but when i do: [SELECT from VIEWs] > I see all the rows always > > this way i lack all the row level security

Re: [HACKERS] Fix number skipping in to_number

2017-11-12 Thread Tom Lane
kip the final increment do it with "continue", and I think this should do likewise. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] New gist vacuum.

2017-11-12 Thread Andrey Borodin
ash table is not very good option if we have all pages there: we should either use array or do not fill table for every page. If author and community do not object, I want to continue work on Konstantin's patch. Best regards, Andrey Borodin. 0001-GiST-VACUUM-rebase.patch Des

[HACKERS] Row Level Security Bug ?

2017-11-12 Thread Andrea Adami
Hello, i have a db with a couple of tables (enclosed the script to recreate it, please have a look before to proceed) i enabled the row level security and all seem to work fine if i do it (connected in as superuser like, usualy, postgres is): select school, description, example from schools i ca

Re: [HACKERS] PSA: don't be in a hurry to update to XCode 9.0

2017-11-12 Thread Tom Lane
Dave Cramer writes: > Did you ever find a solution to this without updating ? No. I filed a bug report which Apple seems uninterested in, perhaps not too surprisingly. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To m

Re: [HACKERS] PSA: don't be in a hurry to update to XCode 9.0

2017-11-12 Thread Dave Cramer
m that animal's >> configuration to restore it to service. I trust I'll be >> able to re-enable that after 10.13 comes out. >> >> regards, tom lane >> >> >> -- >> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) >> To make changes to your subscription: >> http://www.postgresql.org/mailpref/pgsql-hackers >> > >

Re: [HACKERS] WIP: Covering + unique indexes.

2017-11-12 Thread Andrey Borodin
[0] https://github.com/x4m/pgscripts/blob/master/install.sh [1] https://yadi.sk/i/ro9YKFqo3PcwFT [2] https://github.com/x4m/postgres_g/commit/657c28952d923d8c150e6cabb3bdcbbc44a641b6?diff=unified#diff-640baf2937029728a8d51cccd554c2eeR1291 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] A GUC to prevent leader processes from running subplans?

2017-11-12 Thread Thomas Munro
ould be that the leader is getting tied up doing work that takes a long time (sorting, hashing, aggregating) and that's causing the workers to be blocked because their output queue is full. I think that type of behaviour comes from certain plan types, and it probably wouldn't make sense to

Re: [HACKERS] A GUC to prevent leader processes from running subplans?

2017-11-11 Thread Amit Kapila
rticipate in parallelism only for some of the tables. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] GatherMerge misses to push target list

2017-11-11 Thread Amit Kapila
as what you put into it. > Agreed. Your change looks good to me. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-11-11 Thread Pavel Stehule
2017-11-11 21:19 GMT+01:00 Noah Misch : > On Sun, Nov 05, 2017 at 06:10:04PM +0100, Pavel Stehule wrote: > > Hi > > > > 2017-11-05 4:07 GMT+01:00 Noah Misch : > > > > > On Tue, Oct 17, 2017 at 06:06:40AM +0200, Pavel Stehule wrote: > > > > Please, if you can, try it write. I am little bit lost :)

Re: [HACKERS] A GUC to prevent leader processes from running subplans?

2017-11-11 Thread Thomas Munro
I'm not sure why node->need_to_rescan is initialised by both ExecGatherInit() and ExecGather(). Only the latter's value matters, right? I've added this to the January Commitfest. -- Thomas Munro http://www.enterprisedb.com parallel-leader-participation-v1.patch Description: B

Re: [HACKERS] pgbench regression test failure

2017-11-11 Thread Steve Singer
status of this patch is: Waiting on Author -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-11 Thread Mark Dilger
does anything but effectively make them into > superusers who aren't explicitly identified as superusers. Just to help understand your concern, and not to propose actual features, would it help if there were (1) a function, perhaps pg_catalog.pg_exploiters(), which would return all roles

[HACKERS] BUG #14897: Segfault on statitics SQL request

2017-11-11 Thread gmail Vladimir Koković
ember 2017 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Partition-wise aggregation/grouping

2017-11-11 Thread Konstantin Knizhnik
d approach is easier for implementation. But in case of sharded table, distributed query may need to traverse both remote and local shards and this approach doesn't allow to processed several local shards in parallel. -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The R

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-11-11 Thread Noah Misch
s tests too. > > I checked it and it is working. Pushed, but the buildfarm shows I didn't get the test quite right for the non-xml, non-UTF8 case. Fixing. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-11 Thread Tom Lane
o > be available to a non-superuser. We wouldn't be able to change these > functions to start checking the 'directory' rights or we would break > existing non-superuser usage of them. This is a straw man argument --- if we tighten up the function to check this as-yet-nonexis

Re: [HACKERS] [PATCH] A hook for session start

2017-11-11 Thread Fabrízio de Royes Mello
, NULL, NULL); +} + +/* + * Module Unload Callback + */ +void +_PG_fini(void) +{ + /* Uninstall Hooks */ + session_start_hook = prev_session_start_hook; + session_end_hook = prev_session_end_hook; +} diff --git a/src/test/modules/test_session_hooks/test_session_hooks.control b/src/test/modules/test

Re: [HACKERS] parallelize queries containing initplans

2017-11-11 Thread Amit Kapila
here as well? I have fixed the first two in attached patch and left the last one as I was not sure what you have in mind -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com 0002-pq-pushdown-initplan-rebased-1.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-11-11 Thread Robert Haas
27;ve got -- if you're going to invent new general-purpose primitives, they need to go next to the existing functions that do similar things, not in whatever part of the code you first decided you needed them. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgre

Re: [HACKERS] GatherMerge misses to push target list

2017-11-11 Thread Robert Haas
PostgreSQL Company pushdown-gathermerge-tlist.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [Patch] Log SSL certificate verification errors

2017-11-11 Thread Graham Leggett
On 11 Nov 2017, at 6:23 AM, Michael Paquier wrote: >> Currently neither the server side nor the client side SSL certificate verify >> callback does anything, leading to potential hair-tearing-out moments. >> >> The following patch to master implements logging of all certificate >> verification

Re: [HACKERS] [PATCH] A hook for session start

2017-11-11 Thread Michael Paquier
switching the patch as ready for committer. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [Patch] Log SSL certificate verification errors

2017-11-10 Thread Michael Paquier
ply diff is just fine. Here are also some community guidelines on the matter: https://wiki.postgresql.org/wiki/Submitting_a_Patch And if you are looking for feedback, you should register it to the next commit fest: https://commitfest.postgresql.org/16/ -- Michael -- Sent via pgsql-hackers mailin

Re: [HACKERS] pg_upgrade to clusters with a different WAL segment size

2017-11-10 Thread Michael Paquier
; next commitfest. That's a worthy goal. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-10 Thread Michael Paquier
duce the risk of damage from accidental errors. > > +1. That seems like great language to me. +1. Not convinced that mentioning wrappers is worth the complication. Experienced admins likely already know such matters. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-10 Thread Stephen Frost
Michael, Tom, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Fri, Nov 10, 2017 at 10:00 AM, Tom Lane wrote: > > Stephen Frost writes: > >> I'm guessing no, which essentially means that *we* consider access to > >> lo_import/lo_export to be equivilant to superuser and therefore we're >

Re: [HACKERS] Proposal: Improve bitmap costing for lossy pages

2017-11-10 Thread Robert Haas
ument that this is an improvement as it stands, and we can adjust it later if it becomes clear what would be better. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] LDAP URI decoding bugs

2017-11-10 Thread Thomas Munro
come from places like env variables, .ldaprc and /etc/ldap.conf, the way that "ldapsearch" and other tools manage to work with reasonable defaults, or at least only need to be set up in one place for all your LDAP-client software). I'm not planning to work on that. -- Thomas Munro

Re: [HACKERS] parallelize queries containing initplans

2017-11-10 Thread Tom Lane
ting precedent for using InvalidOid to denote the absence > of a parameter -- cf. copyParamList, SerializeParamList. OK, fair enough. I was concerned that this was adding a corner case not otherwise seen with Params, but evidently not. regards, tom lane -- Sent via

Re: [HACKERS] Planning counters in pg_stat_statements

2017-11-10 Thread Thomas Munro
On Tue, Nov 7, 2017 at 6:39 PM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Thomas Munro >> I have often wanted $SUBJECT and was happy to find that Fujii-san had posted >> a patch fi

Re: [HACKERS] parallelize queries containing initplans

2017-11-10 Thread Robert Haas
EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] LDAP URI decoding bugs

2017-11-10 Thread Peter Eisentraut
/www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2017-11-10 Thread Robert Haas
imilar to what you've done elsewhere. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] parallelize queries containing initplans

2017-11-10 Thread Tom Lane
in ..." Also, I wonder whether the InvalidOid hack in SS_assign_special_param requires commentary. It might be safer to use a valid type OID there, perhaps VOIDOID or INTERNALOID. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Peter Eisentraut
rt, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] parallelize queries containing initplans

2017-11-10 Thread Robert Haas
bert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company 0001-param-exec-types-v1.patch Description: Binary data 0002-pq-pushdown-initplan-rebased.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make change

[HACKERS] [Patch] Log SSL certificate verification errors

2017-11-10 Thread Graham Leggett
Hi all, Currently neither the server side nor the client side SSL certificate verify callback does anything, leading to potential hair-tearing-out moments. The following patch to master implements logging of all certificate verification failures, as well as (crucially) which certificates failed

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Peter Eisentraut
st char * case, but not the char ** -> const char ** case. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to you

Re: [HACKERS] Fix bloom WAL tap test

2017-11-10 Thread Tom Lane
5(i::text), 1, 1) FROM generate_series($start,$end) i;" ); This about halved the runtime of the TAP test, and it changed the coverage footprint not at all according to lcov. (Said coverage is only marginally better than what we get without running the bloom TAP test, AFAICT.) It see

Re: [HACKERS] Fix bloom WAL tap test

2017-11-10 Thread Tom Lane
o painful? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Tom Lane
mpiler *should* allow "char **" to be cast to "const char **" silently, but that isn't necessarily what happens in the real world. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Fabien COELHO
eturns, so const char * msg = (const char *) msg_func(); does not really make full sense to me, and moreover the compiler does not complain without the const. -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Incorrect comment for build_child_join_rel

2017-11-10 Thread Robert Haas
On Fri, Nov 10, 2017 at 4:34 AM, Etsuro Fujita wrote: > Here is a small patch for $Subject. Good catch. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To m

Re: [HACKERS] proposal: psql command \graw

2017-11-10 Thread Pavel Stehule
2017-11-10 16:38 GMT+01:00 Fabien COELHO : > > Hello, > > Maybe I'm missing something, but it looks that it could be made to work >>> without adding another boolean. >>> >> >> The tuples only cannot be disabled, because then other parts print number >> of rows >> >> postgres=# \pset format unalign

Re: [HACKERS] Aggregates push-down to partitions

2017-11-10 Thread Konstantin Knizhnik
s Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Tom Lane
the declaration of LWLockTrancheArray and verify that it's char **, because we trust the compiler to whine if char ** isn't assignment-compatible with that. But if we left off the cast and just assigned the function result directly to the variable, then there would be nothing directly tyin

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-10 Thread Robert Haas
DB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [PATCH] A hook for session start

2017-11-10 Thread Fabrízio de Royes Mello
(void) +{ + /* Uninstall Hooks */ + session_start_hook = prev_session_start_hook; + session_end_hook = prev_session_end_hook; +} diff --git a/src/test/modules/test_session_hooks/test_session_hooks.control b/src/test/modules/test_session_hooks/test_session_hooks.control new file mode 100644 index 000..7d7ef9f --- /dev/null +++ b/src/test/modules/test_session_hooks/test_session_hooks.control @@ -0,0 +1,3 @@ +comment = 'Test start/end hook session with an extension' +default_version = '1.0' +relocatable = true -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] pg_upgrade to clusters with a different WAL segment size

2017-11-10 Thread Bossart, Nathan
Hi hackers, The thread for the recent change to allow setting the WAL segment size at initdb time [0] included a bit of discussion regarding pg_upgrade [1], where it was suggested that relaxing an error check (presumably in check_control_data()) might be enough to upgrade servers to a different

Re: [HACKERS] proposal: psql command \graw

2017-11-10 Thread Fabien COELHO
r, either within the header or within the footer... Maybe the whole topt logic should be reviewed, but that is not the point of this patch. So I switched the patch to "ready for committer". -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-10 Thread Tom Lane
We could expand that by mentioning the possibility of wrapper functions, but it seems long enough already. Comments? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Fabien COELHO
I rather like more precise declarations. -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Fabien COELHO
make sense that the function returns "const void *", i.e. the cast is not on the const part but on the pointer type part? -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] PATCH: multivariate histograms and MCV lists

2017-11-10 Thread Mark Dilger
ing. Tom's commit 471d55859c11b40059aef7dd82f82b3a0dc338b1 changed src/bin/psql/describe.c, which breaks your 0001-multivariate-MCV-lists.patch.gz file. I reviewed the patch a few months ago, and as I recall, it looked good to me. I should review it again before approving it, though. mark -- Sent via pgs

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-10 Thread Robert Haas
.patch Description: Binary data 0002-forces-oids-neatnikism-v1.patch Description: Binary data 0003-skip-gather-project-v2.patch Description: Binary data 0004-shm-mq-less-spinlocks-v2.patch Description: Binary data 0005-shm-mq-reduce-receiver-latch-set-v1.patch Description: Binary

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-11-10 Thread Pavel Stehule
no_such_config; select func_with_bad_set(); reset check_function_bodies; + +-- check consistency of SERVER_VERSION +-- which is transmitted as GUC "server_version_raw" +SELECT :'SERVER_VERSION' = VERSION() + AND :'SERVER_VERSION' = current_setting('server_version_raw') + AND :'SERVER_VERSION' = :'VERSION' + AS "SERVER_VERSION is consistent"; -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Peter Eisentraut
Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Transform for pl/perl

2017-11-10 Thread Pavel Stehule
cumentation - probably it should be part of PLPerl 5. The regress tests doesn't coverage other datatypes than numbers. I miss boolean, binary, object, ... Maybe using data::dumper or some similar can be interesting Note - it is great extension, I am pleasured so transformations are used. Regards Pavel > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers >

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-10 Thread Martín Marqués
way (when not in batch mode), as it seems pretty lame to output progress in one line if you are not in a tty. Thoughts? -- Martín Marquéshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2017-11-10 Thread Etsuro Fujita
n't need to ensure those constraints locally. But I'm not sure if the same thing applies to WCOs on views defined on foreign tables, because in some case it's not possible to impose constraints on the remote side that match those WCOs, as I explained before. Best regards, Etsuro Fujita

Re: [HACKERS] Runtime Partition Pruning

2017-11-10 Thread amul sul
you please add few regression tests, that would help in review & testing. 10. Could you please rebase your patch against latest "path toward faster partition pruning" patch by Amit. Regards, Amul -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-10 Thread Amit Kapila
y created database. > I am seeing the assertion failure as below on executing the above mentioned Create statement: TRAP: FailedAssertion("!(!(tup->t_data->t_infomask & 0x0008))", File: "heapam.c", Line: 2634) server closed the connection unexpectedly This probably

[HACKERS] No mention of CREATE STATISTICS in event trigger docs

2017-11-10 Thread David Rowley
A patch to fix this is attached. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services event_trigger_statistics_doc.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

[HACKERS] Incorrect comment for build_child_join_rel

2017-11-10 Thread Etsuro Fujita
tInfo * build_child_join_rel(PlannerInfo *root, RelOptInfo *outer_rel, -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-10 Thread Arthur Zakirov
espro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Aggregates push-down to partitions

2017-11-10 Thread Ashutosh Bapat
On Fri, Nov 10, 2017 at 12:20 AM, Maksim Milyutin wrote: > Hi Konstantin! >> I wonder if somebody already investigate this problem or working in this >> direction. >> May be there are already some patches proposed? >> I have searched hackers archive, but didn't f

Re: [HACKERS] UPDATE of partition key

2017-11-09 Thread Amit Khandekar
#x27; partitioning from the user to the extent we can so that > you can treat the partitioned table just like a table. > > Any other views? I think because because there is no provision for a row trigger on partitioned table, users who want to have a common trigger on a partition subt

Re: [HACKERS] path toward faster partition pruning

2017-11-09 Thread David Rowley
gt;> (BITS_PER_BITMAPWORD - (BITNUM(upper) - 1)); > = No objections here for making bms_add_range() perform better, but this is not going to work when lwordnum == uwordnum. You'd need to special case that. I didn't think it was worth the trouble, but maybe it is... I assume

[HACKERS] pg audit requirements

2017-11-09 Thread Pavel Stehule
Hi I am sending some notes, experience about usage of pgAudit. pgAudit provides basic functionality and usually is good enough. But it is not good enough for some applications in financial services. The requirements: 1. structured output - attached query is not good enough - column name, table

Re: [HACKERS] proposal: psql command \graw

2017-11-09 Thread Pavel Stehule
2017-11-10 8:12 GMT+01:00 Fabien COELHO : > > ISTM that you can remove "force_column_header" and just set "tuple_only" >>> to what you need, that is you do not need to change anything in function >>> "print_unaligned_text". >>> >> >> Last point is not possible - I would not to break original tuple

  1   2   3   4   5   6   7   8   9   10   >