Re: [HACKERS] Removing [Merge]Append nodes which contain a single subpath

2018-04-01 Thread David Rowley
On 16 March 2018 at 04:01, Tom Lane wrote: > I hadn't been paying much attention to this thread, but I've now taken > a quick look at the 2018-02-19 patch, and I've got to say I do not like > it much. The changes in createplan.c in particular seem like hack-and- > slash rather than anything princ

Re: csv format for psql

2018-04-01 Thread Pavel Stehule
2018-04-01 8:30 GMT+02:00 Fabien COELHO : > > Hello Isaac, > > Personnaly I do not have any problem with CSV defaulting to '|' separator, >>> given that anyway people often use anything but a comma for the purpose, >>> including '|'. >>> >>> However Pavel wants to block the patch on this point. To

Re: some last patches breaks plan cache

2018-04-01 Thread Pavel Stehule
2018-04-01 1:00 GMT+02:00 Tomas Vondra : > > > On 03/31/2018 08:28 PM, Tomas Vondra wrote: > > > > > > On 03/31/2018 07:56 PM, Tomas Vondra wrote: > >> On 03/31/2018 07:38 PM, Pavel Stehule wrote: > >>> Hi > >>> > >>> CREATE OR REPLACE PROCEDURE public.proc(a integer, INOUT b integer, c > >>> inte

tab complete for procedures for \sf and \ef commands

2018-04-01 Thread Pavel Stehule
Hi small bugfix patch Regards Pavel diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 6926ca132e..f6f7c52bb0 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3685,7 +3685,7 @@ psql_completion(const char *text, int start, int end) COMPLE

Re: hot_standby_feedback vs excludeVacuum and snapshots

2018-04-01 Thread Simon Riggs
On 31 March 2018 at 14:21, Amit Kapila wrote: > On Thu, Mar 29, 2018 at 4:47 PM, Greg Stark wrote: >> I'm poking around to see debug a vacuuming problem and wondering if >> I've found something more serious. >> >> As far as I can tell the snapshots on HOT standby are built using a >> list of runn

Re: Online enabling of checksums

2018-04-01 Thread Magnus Hagander
On Sat, Mar 31, 2018 at 5:38 PM, Tomas Vondra wrote: > On 03/31/2018 05:05 PM, Magnus Hagander wrote: > > On Sat, Mar 31, 2018 at 4:21 PM, Tomas Vondra > > mailto:tomas.von...@2ndquadrant.com>> > wrote: > > > > ... > > > > I do think just waiting for all running transactions to complete is >

Diagonal storage model

2018-04-01 Thread Konstantin Knizhnik
Hi hackers, Vertical (columnar) storage mode is most optimal for analytic and this is why it is widely used in databases oriented on OLAP, such as Vertica, HyPer,KDB,... In Postgres we have cstore extension which is not able to provide all benefits of vertical model because of lack of support o

Re: new function for tsquery creartion

2018-04-01 Thread Aleksandr Parfenov
Hello hackers, On 2018-03-28 12:21, Aleksander Alekseev wrote: It doesn't sound right to me to accept any input as a general rule but sometimes return errors nevertheless. That API would be complicated for the users. Thus I suggest to accept any garbage and try our best to interpret it. I agre

Re: Add default role 'pg_access_server_files'

2018-04-01 Thread Stephen Frost
Greetings, * Michael Paquier (mich...@paquier.xyz) wrote: > On Sun, Mar 25, 2018 at 09:43:25PM -0400, Stephen Frost wrote: > > * Michael Paquier (mich...@paquier.xyz) wrote: > >> On Thu, Mar 08, 2018 at 10:15:11AM +0900, Michael Paquier wrote: > >> > Other than that the patch looks in pretty good

Re: [HACKERS] Re: Improve OR conditions on joined columns (common star schema problem)

2018-04-01 Thread David Rowley
On 3 February 2018 at 03:26, Tom Lane wrote: > Tomas Vondra writes: >> ISTM this patch got somewhat stuck as we're not quite sure the >> transformation is correct in all cases. Is my impression correct? > > Yeah, that's the core issue. > >> If yes, how to we convince ourselves? Would some sort of

Re: [HACKERS] Re: Improve OR conditions on joined columns (common star schema problem)

2018-04-01 Thread David Rowley
On 30 March 2018 at 15:05, Andres Freund wrote: >> + * To allow join removal to happen, we can't reference the CTID column >> + * of an otherwise-removable relation. > > A brief hint why wouldn't hurt. Maybe something like: /* * Join removal is only ever possible when no columns of the to-be-re

Re: Diagonal storage model

2018-04-01 Thread Дмитрий Воронин
Hi, Konstantin! Thank you for working on new pluggable storage API. Your patch in attachment is 505 bytes and contains only diff from explain.c. Is it right? 01.04.2018, 15:48, "Konstantin Knizhnik" : > Hi hackers, > > Vertical (columnar) storage mode is most optimal for analytic and this is wh

json(b)_to_tsvector with numeric values

2018-04-01 Thread Dmitry Dolgov
Hi, We've just noticed, that current implementation of `json(b)_to_tsvector` can be confusing sometimes, if the target document contains numeric values. In this case we just drop them, and only string values will contribute to the result: select to_tsvector('english', '{"a": "The Fat Rats", "

Re: [PATCH] Verify Checksums during Basebackups

2018-04-01 Thread Magnus Hagander
On Sat, Mar 31, 2018 at 2:54 PM, Michael Banck wrote: > Hi, > > On Fri, Mar 30, 2018 at 07:46:02AM -0400, Stephen Frost wrote: > > * Magnus Hagander (mag...@hagander.net) wrote: > > > On Fri, Mar 30, 2018 at 5:35 AM, David Steele > wrote: > > > > > > > On 3/24/18 10:32 AM, Michael Banck wrote: >

Re: [PATCH] pg_hba.conf : new auth option : clientcert=verify-full

2018-04-01 Thread Magnus Hagander
On Fri, Mar 23, 2018 at 3:45 PM, Julian Markwort < julian.markw...@uni-muenster.de> wrote: > On Sat, 2018-03-17 at 18:24 +0100, Magnus Hagander wrote: > > The error message "certificate authentication failed for user XYZ: > client certificate contains no user name" is the result of calling > Check

Re: [PATCH] pg_hba.conf : new auth option : clientcert=verify-full

2018-04-01 Thread Julian Markwort
On 1. of April 2018 17:46:38 MESZ wrote Magnus Hagander : >I assume this is a patch that's intended to be applied on top of the >previous patch? If so, please submit the complete pach to make sure the >correct combination ends up actually being reviewed. The v02.patch attached to my last mail con

Re: [PATCH] pg_hba.conf : new auth option : clientcert=verify-full

2018-04-01 Thread Magnus Hagander
On Sun, Apr 1, 2018 at 6:01 PM, Julian Markwort < julian.markw...@uni-muenster.de> wrote: > On 1. of April 2018 17:46:38 MESZ wrote Magnus Hagander < > mag...@hagander.net>: > > >I assume this is a patch that's intended to be applied on top of the > >previous patch? If so, please submit the comple

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

2018-04-01 Thread Tomas Vondra
re (2a). regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 0001-multivariate-MCV-lists-20180401.patch.gz Description: application/gzip 0002-multivariate-histograms-20180401.patch.gz Description: application/gzip

Re: Planning counters in pg_stat_statements

2018-04-01 Thread legrand legrand
Hello, When testing this patch on my WIN1252 database with my java front end, using 11devel snapshot I get org.posgresql.util.PSQLException: ERROR: character with byte sequence 0x90 in encoding "WIN1252" has no equivalent in encoding "UTF8" When using psql with client_encoding = WIN1252, q

Re: Diagonal storage model

2018-04-01 Thread legrand legrand
Great Idea ! thank you Konstantin -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

Re: Diagonal storage model

2018-04-01 Thread Alexander Korotkov
Hi! On Sun, Apr 1, 2018 at 3:48 PM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > I want to announce new model, "diagonal storage" which combines benefits > of both approaches. > The idea is very simple: we first store column 1 of first record, then > column 2 of second record, ... an

Re: Optimize Arm64 crc32c implementation in Postgresql

2018-04-01 Thread Andres Freund
Hi, On 2018-03-06 02:44:35 +0800, Heikki Linnakangas wrote: > On 02/03/18 06:42, Andres Freund wrote: > > On 2018-03-02 11:37:52 +1300, Thomas Munro wrote: > > > So... that stuff probably needs either a configure check for the > > > getauxval function and/or those headers, or an OS check? > > > >

Rethinking -L switch handling and construction of LDFLAGS

2018-04-01 Thread Tom Lane
I noticed that if I build with --with-libxml on my Mac platforms, "make installcheck" stops working for certain contrib modules such as postgres_fdw. I finally got around to diagnosing the reason why, and it goes like this: 1. --with-libxml causes configure to include -L/Applications/Xco

Re: Rethinking -L switch handling and construction of LDFLAGS

2018-04-01 Thread Andres Freund
Hi, On 2018-04-01 13:38:15 -0400, Tom Lane wrote: > In short, we need to deal more honestly with the positioning of -L > switches in link commands. Somebody's idea that we could embed > both -L and -l into $(libpq), and then pay basically no attention to > where that ends up in the final link com

Re: [HACKERS] Lazy hash table for XidInMVCCSnapshot (helps Zipfian a bit)

2018-04-01 Thread Yura Sokolov
17.03.2018 03:36, Tomas Vondra пишет: > > On 03/17/2018 12:03 AM, Yura Sokolov wrote: >> 16.03.2018 04:23, Tomas Vondra пишет: >>> >>> ... >>> >>> OK, a few more comments. >>> >>> 1) The code in ExtendXipSizeForHash seems somewhat redundant with >>> my_log2 (that is, we could just call the existin

Re: Rethinking -L switch handling and construction of LDFLAGS

2018-04-01 Thread Tom Lane
Andres Freund writes: > On 2018-04-01 13:38:15 -0400, Tom Lane wrote: >> I don't have a concrete patch to propose yet, but the design idea >> I have in mind is to split LDFLAGS into two or more parts, so that >> -L switches for the build tree are supposed to be put in the first >> part and externa

Re: [HACKERS] Lazy hash table for XidInMVCCSnapshot (helps Zipfian a bit)

2018-04-01 Thread Yura Sokolov
23.03.2018 17:59, Amit Kapila пишет: > On Sat, Mar 10, 2018 at 7:41 AM, Yura Sokolov wrote: >> 08.03.2018 03:42, Tomas Vondra пишет: >>> One reason against building the hash table in GetSnapshotData is that >>> we'd build it even when the snapshot is never queried. Or when it is >>> queried, but w

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-04-01 Thread Thomas Munro
On Fri, Mar 30, 2018 at 10:18 AM, Thomas Munro wrote: > ... on Linux only. Apparently I was too optimistic. I had looked only at FreeBSD, which keeps the page around and dirties it so we can retry, but the other BSDs apparently don't (FreeBSD changed that in 1999). From what I can tell from the

Re: Planning counters in pg_stat_statements

2018-04-01 Thread legrand legrand
I forgot to recompile core ... now only utility statements (with 0 plans) seems truncated. Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

Re: bulk typos

2018-04-01 Thread Tom Lane
=?UTF-8?Q?F=C3=A9lix_GERZAGUET?= writes: > On Sat, Mar 31, 2018 at 12:56 PM, Justin Pryzby > wrote: >> I needed another distraction so bulk-checked for typos, limited to >> comments in *.[ch]. > I think you introduced another one while changing "explcitly" to > "expilcitly" instead of "explicitl

Re: bulk typos

2018-04-01 Thread Andres Freund
Hi, On 2018-03-31 05:56:40 -0500, Justin Pryzby wrote: > --- a/src/backend/jit/llvm/llvmjit_expr.c > +++ b/src/backend/jit/llvm/llvmjit_expr.c > @@ -1768,7 +1768,7 @@ llvm_compile_expr(ExprState *state) > > b_compare_result, >

Re: Rethinking -L switch handling and construction of LDFLAGS

2018-04-01 Thread Andres Freund
Hi, On 2018-04-01 13:55:05 -0400, Tom Lane wrote: > > Why don't we change the link commands to reference LDFLAGS_INTERNAL > > explicitly? That seems like it'd be cleaner. > > I'm hesitant to do that because LDFLAGS is a name known to make's > default rules, and I don't want to bet that we're not

Re: Rethinking -L switch handling and construction of LDFLAGS

2018-04-01 Thread Tom Lane
Andres Freund writes: > On 2018-04-01 13:55:05 -0400, Tom Lane wrote: >> I'm hesitant to do that because LDFLAGS is a name known to make's >> default rules, and I don't want to bet that we're not relying on >> those default rules anywhere. > FWIW, postgres builds cleanly with -r -R in MAKELAGS.

Re: new function for tsquery creartion

2018-04-01 Thread Dmitry Ivanov
Hi Aleksandr, I agree with Aleksander about silencing all errors in websearch_to_tsquery(). In the attachment is a revised patch with the attempt to introduce an ability to ignore syntax errors in gettoken_tsvector(). Thanks for the further improvements! Yes, you're both right, the API has

Re: [PATCH] Logical decoding of TRUNCATE

2018-04-01 Thread Andres Freund
On 2018-01-25 14:21:15 +0100, Marco Nenciarini wrote: > + if (SessionReplicationRole != SESSION_REPLICATION_ROLE_REPLICA) > + { > + > + /* > + * Check foreign key references. In CASCADE mode, this should > be > + * unnecessary since we just pulled in

Re: Optimizing nested ConvertRowtypeExpr execution

2018-04-01 Thread Andres Freund
Hi, On 2018-02-26 17:20:05 +0530, Ashutosh Bapat wrote: > In a multi-level partitioned table, a parent whole-row reference gets > translated into nested ConvertRowtypeExpr with child whole-row > reference as the leaf. During the execution, the child whole-row > reference gets translated into all a

Re: bulk typos

2018-04-01 Thread Gavin Flower
On 02/04/18 07:03, Tom Lane wrote: =?UTF-8?Q?F=C3=A9lix_GERZAGUET?= writes: On Sat, Mar 31, 2018 at 12:56 PM, Justin Pryzby wrote: I needed another distraction so bulk-checked for typos, limited to comments in *.[ch]. I think you introduced another one while changing "explcitly" to "expilcit

Re: [HACKERS] Insert values() per-statement overhead

2018-04-01 Thread Vladimir Sitnikov
Andres>I think the biggestoverhead here is that the executor startup includes Andres>too many indirect (linked lists) datastructured, that allocated each Andres>round The case is very common: batch inserts are popular in Java, and ORMs use batch API automatically. However, there's high per-backend

Re: Diagonal storage model

2018-04-01 Thread David Fetter
On Sun, Apr 01, 2018 at 03:48:07PM +0300, Konstantin Knizhnik wrote: > Hi hackers, > > Vertical (columnar) storage mode is most optimal for analytic and this is why > it is widely used in databases oriented on OLAP, such as Vertica, > HyPer,KDB,... > In Postgres we have cstore extension which is

Re: WIP: Covering + unique indexes.

2018-04-01 Thread Peter Geoghegan
On Sun, Apr 1, 2018 at 10:09 AM, Alexander Korotkov wrote: >> So? GIN doesn't have the same legacy at all. The GIN posting lists >> *don't* have regular heap TID pointers at all. They started out >> without them, and still don't have them. > > > Yes, GIN never stored heap TID pointers in t_tid of

Re: Diagonal storage model

2018-04-01 Thread Marko Tiikkaja
On Sun, Apr 1, 2018 at 3:48 PM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > I want to announce new model, "diagonal storage" which combines benefits > of both approaches. > The idea is very simple: we first store column 1 of first record, then > column 2 of second record, ... and so

Re: [HACKERS] path toward faster partition pruning

2018-04-01 Thread Amit Langote
On 2018/03/30 22:41, David Rowley wrote: > On 31 March 2018 at 02:00, David Rowley wrote: >> On 31 March 2018 at 01:18, David Rowley wrote: >>> I've noticed that there are no outfuncs or readfuncs for all the new >>> Step types you've added. >>> >>> Also, the copy func does not properly copy the

Re: Commit 4dba331cb3 broke ATTACH PARTITION behaviour.

2018-04-01 Thread Jeevan Ladhe
Hi, I noticed that there were no tests covering this case causing 4dba331cb3 > to not notice this failure in the first place. I updated your patch to > add a few tests. Also, I revised the comment changed by your patch a bit. > 1. A minor typo: +-- check that violating rows are correctly repor

Re: Add default role 'pg_access_server_files'

2018-04-01 Thread Michael Paquier
On Sun, Apr 01, 2018 at 09:39:02AM -0400, Stephen Frost wrote: > Thanks for checking. Attached is an updated version which also includes > the changes for adminpack, done in a similar manner to how pgstattuple > was updated, as discussed. Regression tests updated and extended a bit, > doc updates

Re: Commit 4dba331cb3 broke ATTACH PARTITION behaviour.

2018-04-01 Thread Amit Langote
Thanks Jeevan for reviewing. On 2018/04/02 13:10, Jeevan Ladhe wrote: > Hi, > > I noticed that there were no tests covering this case causing 4dba331cb3 >> to not notice this failure in the first place. I updated your patch to >> add a few tests. Also, I revised the comment changed by your patc

Re: PATCH: Configurable file mode mask

2018-04-01 Thread Michael Paquier
On Fri, Mar 30, 2018 at 01:27:11PM -0400, David Steele wrote: > I have replaced data_directory_group_access with data_directory_mode. That looks way better. Thanks for considering it. > I decided this made sense to do. It was only a few lines in initdb.c > using a very well established pattern.

Re: [PATCH] Logical decoding of TRUNCATE

2018-04-01 Thread Simon Riggs
On 1 April 2018 at 21:01, Andres Freund wrote: >> *** >> *** 111,116 CREATE PUBLICATION > class="parameter">name >> --- 111,121 >> and so the default value for this option is >> 'insert, update, delete'. >> >> + >> +T

Re: json(b)_to_tsvector with numeric values

2018-04-01 Thread Arthur Zakirov
Hello Dmitry, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > Any opinions about this suggestion? Can it be considered as a bug fix and > included into this release? > I think there is no chance to include it into v11. You can add the patch to the 2018-09 commitfest. -- Arthur Zakirov Postgre

check_ssl_key_file_permissions should be in be-secure-common.c

2018-04-01 Thread Michael Paquier
Peter, Daniel, The recent commit 8a3d9425 which has introduced SSL passphrase support has also added be-secure-common.c, which works similarly to fe-secure-common.c but for the backend. I was just reading this code area, when I noticed that check_ssl_key_file_permissions is called by be-secure-op

Re: [HACKERS] Removing [Merge]Append nodes which contain a single subpath

2018-04-01 Thread David Rowley
On 16 March 2018 at 04:01, Tom Lane wrote: > I hadn't been paying much attention to this thread, but I've now taken > a quick look at the 2018-02-19 patch, and I've got to say I do not like > it much. The changes in createplan.c in particular seem like hack-and- > slash rather than anything princ

Re: csv format for psql

2018-04-01 Thread Pavel Stehule
2018-04-01 8:30 GMT+02:00 Fabien COELHO : > > Hello Isaac, > > Personnaly I do not have any problem with CSV defaulting to '|' separator, >>> given that anyway people often use anything but a comma for the purpose, >>> including '|'. >>> >>> However Pavel wants to block the patch on this point. To

Re: some last patches breaks plan cache

2018-04-01 Thread Pavel Stehule
2018-04-01 1:00 GMT+02:00 Tomas Vondra : > > > On 03/31/2018 08:28 PM, Tomas Vondra wrote: > > > > > > On 03/31/2018 07:56 PM, Tomas Vondra wrote: > >> On 03/31/2018 07:38 PM, Pavel Stehule wrote: > >>> Hi > >>> > >>> CREATE OR REPLACE PROCEDURE public.proc(a integer, INOUT b integer, c > >>> inte

tab complete for procedures for \sf and \ef commands

2018-04-01 Thread Pavel Stehule
Hi small bugfix patch Regards Pavel diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 6926ca132e..f6f7c52bb0 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3685,7 +3685,7 @@ psql_completion(const char *text, int start, int end) COMPLE

Re: hot_standby_feedback vs excludeVacuum and snapshots

2018-04-01 Thread Simon Riggs
On 31 March 2018 at 14:21, Amit Kapila wrote: > On Thu, Mar 29, 2018 at 4:47 PM, Greg Stark wrote: >> I'm poking around to see debug a vacuuming problem and wondering if >> I've found something more serious. >> >> As far as I can tell the snapshots on HOT standby are built using a >> list of runn

Re: Online enabling of checksums

2018-04-01 Thread Magnus Hagander
On Sat, Mar 31, 2018 at 5:38 PM, Tomas Vondra wrote: > On 03/31/2018 05:05 PM, Magnus Hagander wrote: > > On Sat, Mar 31, 2018 at 4:21 PM, Tomas Vondra > > mailto:tomas.von...@2ndquadrant.com>> > wrote: > > > > ... > > > > I do think just waiting for all running transactions to complete is >

Diagonal storage model

2018-04-01 Thread Konstantin Knizhnik
Hi hackers, Vertical (columnar) storage mode is most optimal for analytic and this is why it is widely used in databases oriented on OLAP, such as Vertica, HyPer,KDB,... In Postgres we have cstore extension which is not able to provide all benefits of vertical model because of lack of support o

Re: new function for tsquery creartion

2018-04-01 Thread Aleksandr Parfenov
Hello hackers, On 2018-03-28 12:21, Aleksander Alekseev wrote: It doesn't sound right to me to accept any input as a general rule but sometimes return errors nevertheless. That API would be complicated for the users. Thus I suggest to accept any garbage and try our best to interpret it. I agre

Re: Add default role 'pg_access_server_files'

2018-04-01 Thread Stephen Frost
Greetings, * Michael Paquier (mich...@paquier.xyz) wrote: > On Sun, Mar 25, 2018 at 09:43:25PM -0400, Stephen Frost wrote: > > * Michael Paquier (mich...@paquier.xyz) wrote: > >> On Thu, Mar 08, 2018 at 10:15:11AM +0900, Michael Paquier wrote: > >> > Other than that the patch looks in pretty good

Re: [HACKERS] Re: Improve OR conditions on joined columns (common star schema problem)

2018-04-01 Thread David Rowley
On 3 February 2018 at 03:26, Tom Lane wrote: > Tomas Vondra writes: >> ISTM this patch got somewhat stuck as we're not quite sure the >> transformation is correct in all cases. Is my impression correct? > > Yeah, that's the core issue. > >> If yes, how to we convince ourselves? Would some sort of

Re: [HACKERS] Re: Improve OR conditions on joined columns (common star schema problem)

2018-04-01 Thread David Rowley
On 30 March 2018 at 15:05, Andres Freund wrote: >> + * To allow join removal to happen, we can't reference the CTID column >> + * of an otherwise-removable relation. > > A brief hint why wouldn't hurt. Maybe something like: /* * Join removal is only ever possible when no columns of the to-be-re

Re: Diagonal storage model

2018-04-01 Thread Дмитрий Воронин
Hi, Konstantin! Thank you for working on new pluggable storage API. Your patch in attachment is 505 bytes and contains only diff from explain.c. Is it right? 01.04.2018, 15:48, "Konstantin Knizhnik" : > Hi hackers, > > Vertical (columnar) storage mode is most optimal for analytic and this is wh

json(b)_to_tsvector with numeric values

2018-04-01 Thread Dmitry Dolgov
Hi, We've just noticed, that current implementation of `json(b)_to_tsvector` can be confusing sometimes, if the target document contains numeric values. In this case we just drop them, and only string values will contribute to the result: select to_tsvector('english', '{"a": "The Fat Rats", "

Re: [PATCH] Verify Checksums during Basebackups

2018-04-01 Thread Magnus Hagander
On Sat, Mar 31, 2018 at 2:54 PM, Michael Banck wrote: > Hi, > > On Fri, Mar 30, 2018 at 07:46:02AM -0400, Stephen Frost wrote: > > * Magnus Hagander (mag...@hagander.net) wrote: > > > On Fri, Mar 30, 2018 at 5:35 AM, David Steele > wrote: > > > > > > > On 3/24/18 10:32 AM, Michael Banck wrote: >

Re: [PATCH] pg_hba.conf : new auth option : clientcert=verify-full

2018-04-01 Thread Magnus Hagander
On Fri, Mar 23, 2018 at 3:45 PM, Julian Markwort < julian.markw...@uni-muenster.de> wrote: > On Sat, 2018-03-17 at 18:24 +0100, Magnus Hagander wrote: > > The error message "certificate authentication failed for user XYZ: > client certificate contains no user name" is the result of calling > Check

Re: [PATCH] pg_hba.conf : new auth option : clientcert=verify-full

2018-04-01 Thread Julian Markwort
On 1. of April 2018 17:46:38 MESZ wrote Magnus Hagander : >I assume this is a patch that's intended to be applied on top of the >previous patch? If so, please submit the complete pach to make sure the >correct combination ends up actually being reviewed. The v02.patch attached to my last mail con

Re: [PATCH] pg_hba.conf : new auth option : clientcert=verify-full

2018-04-01 Thread Magnus Hagander
On Sun, Apr 1, 2018 at 6:01 PM, Julian Markwort < julian.markw...@uni-muenster.de> wrote: > On 1. of April 2018 17:46:38 MESZ wrote Magnus Hagander < > mag...@hagander.net>: > > >I assume this is a patch that's intended to be applied on top of the > >previous patch? If so, please submit the comple

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

2018-04-01 Thread Tomas Vondra
re (2a). regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 0001-multivariate-MCV-lists-20180401.patch.gz Description: application/gzip 0002-multivariate-histograms-20180401.patch.gz Description: application/gzip

Re: Planning counters in pg_stat_statements

2018-04-01 Thread legrand legrand
Hello, When testing this patch on my WIN1252 database with my java front end, using 11devel snapshot I get org.posgresql.util.PSQLException: ERROR: character with byte sequence 0x90 in encoding "WIN1252" has no equivalent in encoding "UTF8" When using psql with client_encoding = WIN1252, q

Re: Diagonal storage model

2018-04-01 Thread legrand legrand
Great Idea ! thank you Konstantin -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

Re: Diagonal storage model

2018-04-01 Thread Alexander Korotkov
Hi! On Sun, Apr 1, 2018 at 3:48 PM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > I want to announce new model, "diagonal storage" which combines benefits > of both approaches. > The idea is very simple: we first store column 1 of first record, then > column 2 of second record, ... an

Re: Optimize Arm64 crc32c implementation in Postgresql

2018-04-01 Thread Andres Freund
Hi, On 2018-03-06 02:44:35 +0800, Heikki Linnakangas wrote: > On 02/03/18 06:42, Andres Freund wrote: > > On 2018-03-02 11:37:52 +1300, Thomas Munro wrote: > > > So... that stuff probably needs either a configure check for the > > > getauxval function and/or those headers, or an OS check? > > > >

Rethinking -L switch handling and construction of LDFLAGS

2018-04-01 Thread Tom Lane
I noticed that if I build with --with-libxml on my Mac platforms, "make installcheck" stops working for certain contrib modules such as postgres_fdw. I finally got around to diagnosing the reason why, and it goes like this: 1. --with-libxml causes configure to include -L/Applications/Xco

Re: Rethinking -L switch handling and construction of LDFLAGS

2018-04-01 Thread Andres Freund
Hi, On 2018-04-01 13:38:15 -0400, Tom Lane wrote: > In short, we need to deal more honestly with the positioning of -L > switches in link commands. Somebody's idea that we could embed > both -L and -l into $(libpq), and then pay basically no attention to > where that ends up in the final link com

Re: [HACKERS] Lazy hash table for XidInMVCCSnapshot (helps Zipfian a bit)

2018-04-01 Thread Yura Sokolov
17.03.2018 03:36, Tomas Vondra пишет: > > On 03/17/2018 12:03 AM, Yura Sokolov wrote: >> 16.03.2018 04:23, Tomas Vondra пишет: >>> >>> ... >>> >>> OK, a few more comments. >>> >>> 1) The code in ExtendXipSizeForHash seems somewhat redundant with >>> my_log2 (that is, we could just call the existin

Re: Rethinking -L switch handling and construction of LDFLAGS

2018-04-01 Thread Tom Lane
Andres Freund writes: > On 2018-04-01 13:38:15 -0400, Tom Lane wrote: >> I don't have a concrete patch to propose yet, but the design idea >> I have in mind is to split LDFLAGS into two or more parts, so that >> -L switches for the build tree are supposed to be put in the first >> part and externa

Re: [HACKERS] Lazy hash table for XidInMVCCSnapshot (helps Zipfian a bit)

2018-04-01 Thread Yura Sokolov
23.03.2018 17:59, Amit Kapila пишет: > On Sat, Mar 10, 2018 at 7:41 AM, Yura Sokolov wrote: >> 08.03.2018 03:42, Tomas Vondra пишет: >>> One reason against building the hash table in GetSnapshotData is that >>> we'd build it even when the snapshot is never queried. Or when it is >>> queried, but w

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-04-01 Thread Thomas Munro
On Fri, Mar 30, 2018 at 10:18 AM, Thomas Munro wrote: > ... on Linux only. Apparently I was too optimistic. I had looked only at FreeBSD, which keeps the page around and dirties it so we can retry, but the other BSDs apparently don't (FreeBSD changed that in 1999). From what I can tell from the

Re: Planning counters in pg_stat_statements

2018-04-01 Thread legrand legrand
I forgot to recompile core ... now only utility statements (with 0 plans) seems truncated. Regards PAscal -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

Re: bulk typos

2018-04-01 Thread Tom Lane
=?UTF-8?Q?F=C3=A9lix_GERZAGUET?= writes: > On Sat, Mar 31, 2018 at 12:56 PM, Justin Pryzby > wrote: >> I needed another distraction so bulk-checked for typos, limited to >> comments in *.[ch]. > I think you introduced another one while changing "explcitly" to > "expilcitly" instead of "explicitl

Re: bulk typos

2018-04-01 Thread Andres Freund
Hi, On 2018-03-31 05:56:40 -0500, Justin Pryzby wrote: > --- a/src/backend/jit/llvm/llvmjit_expr.c > +++ b/src/backend/jit/llvm/llvmjit_expr.c > @@ -1768,7 +1768,7 @@ llvm_compile_expr(ExprState *state) > > b_compare_result, >

Re: Rethinking -L switch handling and construction of LDFLAGS

2018-04-01 Thread Andres Freund
Hi, On 2018-04-01 13:55:05 -0400, Tom Lane wrote: > > Why don't we change the link commands to reference LDFLAGS_INTERNAL > > explicitly? That seems like it'd be cleaner. > > I'm hesitant to do that because LDFLAGS is a name known to make's > default rules, and I don't want to bet that we're not

Re: Rethinking -L switch handling and construction of LDFLAGS

2018-04-01 Thread Tom Lane
Andres Freund writes: > On 2018-04-01 13:55:05 -0400, Tom Lane wrote: >> I'm hesitant to do that because LDFLAGS is a name known to make's >> default rules, and I don't want to bet that we're not relying on >> those default rules anywhere. > FWIW, postgres builds cleanly with -r -R in MAKELAGS.

Re: new function for tsquery creartion

2018-04-01 Thread Dmitry Ivanov
Hi Aleksandr, I agree with Aleksander about silencing all errors in websearch_to_tsquery(). In the attachment is a revised patch with the attempt to introduce an ability to ignore syntax errors in gettoken_tsvector(). Thanks for the further improvements! Yes, you're both right, the API has

Re: [PATCH] Logical decoding of TRUNCATE

2018-04-01 Thread Andres Freund
On 2018-01-25 14:21:15 +0100, Marco Nenciarini wrote: > + if (SessionReplicationRole != SESSION_REPLICATION_ROLE_REPLICA) > + { > + > + /* > + * Check foreign key references. In CASCADE mode, this should > be > + * unnecessary since we just pulled in

Re: Optimizing nested ConvertRowtypeExpr execution

2018-04-01 Thread Andres Freund
Hi, On 2018-02-26 17:20:05 +0530, Ashutosh Bapat wrote: > In a multi-level partitioned table, a parent whole-row reference gets > translated into nested ConvertRowtypeExpr with child whole-row > reference as the leaf. During the execution, the child whole-row > reference gets translated into all a

Re: bulk typos

2018-04-01 Thread Gavin Flower
On 02/04/18 07:03, Tom Lane wrote: =?UTF-8?Q?F=C3=A9lix_GERZAGUET?= writes: On Sat, Mar 31, 2018 at 12:56 PM, Justin Pryzby wrote: I needed another distraction so bulk-checked for typos, limited to comments in *.[ch]. I think you introduced another one while changing "explcitly" to "expilcit

Re: [HACKERS] Insert values() per-statement overhead

2018-04-01 Thread Vladimir Sitnikov
Andres>I think the biggestoverhead here is that the executor startup includes Andres>too many indirect (linked lists) datastructured, that allocated each Andres>round The case is very common: batch inserts are popular in Java, and ORMs use batch API automatically. However, there's high per-backend

Re: Diagonal storage model

2018-04-01 Thread David Fetter
On Sun, Apr 01, 2018 at 03:48:07PM +0300, Konstantin Knizhnik wrote: > Hi hackers, > > Vertical (columnar) storage mode is most optimal for analytic and this is why > it is widely used in databases oriented on OLAP, such as Vertica, > HyPer,KDB,... > In Postgres we have cstore extension which is

Re: WIP: Covering + unique indexes.

2018-04-01 Thread Peter Geoghegan
On Sun, Apr 1, 2018 at 10:09 AM, Alexander Korotkov wrote: >> So? GIN doesn't have the same legacy at all. The GIN posting lists >> *don't* have regular heap TID pointers at all. They started out >> without them, and still don't have them. > > > Yes, GIN never stored heap TID pointers in t_tid of

Re: Diagonal storage model

2018-04-01 Thread Marko Tiikkaja
On Sun, Apr 1, 2018 at 3:48 PM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > I want to announce new model, "diagonal storage" which combines benefits > of both approaches. > The idea is very simple: we first store column 1 of first record, then > column 2 of second record, ... and so

Re: [HACKERS] path toward faster partition pruning

2018-04-01 Thread Amit Langote
On 2018/03/30 22:41, David Rowley wrote: > On 31 March 2018 at 02:00, David Rowley wrote: >> On 31 March 2018 at 01:18, David Rowley wrote: >>> I've noticed that there are no outfuncs or readfuncs for all the new >>> Step types you've added. >>> >>> Also, the copy func does not properly copy the

Re: Commit 4dba331cb3 broke ATTACH PARTITION behaviour.

2018-04-01 Thread Jeevan Ladhe
Hi, I noticed that there were no tests covering this case causing 4dba331cb3 > to not notice this failure in the first place. I updated your patch to > add a few tests. Also, I revised the comment changed by your patch a bit. > 1. A minor typo: +-- check that violating rows are correctly repor

Re: Add default role 'pg_access_server_files'

2018-04-01 Thread Michael Paquier
On Sun, Apr 01, 2018 at 09:39:02AM -0400, Stephen Frost wrote: > Thanks for checking. Attached is an updated version which also includes > the changes for adminpack, done in a similar manner to how pgstattuple > was updated, as discussed. Regression tests updated and extended a bit, > doc updates

Re: Commit 4dba331cb3 broke ATTACH PARTITION behaviour.

2018-04-01 Thread Amit Langote
Thanks Jeevan for reviewing. On 2018/04/02 13:10, Jeevan Ladhe wrote: > Hi, > > I noticed that there were no tests covering this case causing 4dba331cb3 >> to not notice this failure in the first place. I updated your patch to >> add a few tests. Also, I revised the comment changed by your patc

Re: PATCH: Configurable file mode mask

2018-04-01 Thread Michael Paquier
On Fri, Mar 30, 2018 at 01:27:11PM -0400, David Steele wrote: > I have replaced data_directory_group_access with data_directory_mode. That looks way better. Thanks for considering it. > I decided this made sense to do. It was only a few lines in initdb.c > using a very well established pattern.

Re: [PATCH] Logical decoding of TRUNCATE

2018-04-01 Thread Simon Riggs
On 1 April 2018 at 21:01, Andres Freund wrote: >> *** >> *** 111,116 CREATE PUBLICATION > class="parameter">name >> --- 111,121 >> and so the default value for this option is >> 'insert, update, delete'. >> >> + >> +T

Re: json(b)_to_tsvector with numeric values

2018-04-01 Thread Arthur Zakirov
Hello Dmitry, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > Any opinions about this suggestion? Can it be considered as a bug fix and > included into this release? > I think there is no chance to include it into v11. You can add the patch to the 2018-09 commitfest. -- Arthur Zakirov Postgre

check_ssl_key_file_permissions should be in be-secure-common.c

2018-04-01 Thread Michael Paquier
Peter, Daniel, The recent commit 8a3d9425 which has introduced SSL passphrase support has also added be-secure-common.c, which works similarly to fe-secure-common.c but for the backend. I was just reading this code area, when I noticed that check_ssl_key_file_permissions is called by be-secure-op