Re: Enhance pg_stat_wal_receiver view to display connected host

2018-01-02 Thread Haribabu Kommi
On Wed, Jan 3, 2018 at 12:25 PM, Haribabu Kommi wrote: > > > update patch attached. > Last patch has undefined symbol, corrected patch attached. Regards, Hari Babu Fujitsu Australia pg_stat_wal_receiver-to-display-connected-host_v3.patch Description: Binary data

Re: [HACKERS] UPDATE of partition key

2018-01-02 Thread Amit Khandekar
On 1 January 2018 at 21:43, Amit Khandekar wrote: > On 16 December 2017 at 03:09, Robert Haas wrote: >> + /* >> + * UPDATEs set the transition capture map only when a new subplan >> + * is chosen. But for INSERTs, it is set for each row. So after >> + * INSERT, we need to revert back to the map

Re: [HACKERS] UPDATE of partition key

2018-01-02 Thread Amit Khandekar
On 2 January 2018 at 10:56, David Rowley wrote: > On 23 December 2017 at 04:00, Amit Khandekar wrote: >> On 15 December 2017 at 18:28, Robert Haas wrote: >>> -PartitionDispatch **pd, >>> -ResultRelInfo ***partitions, >>> -TupleConversionMap ***tup_conv_maps, >>> -TupleTableSlot *

Re: CFM for January commitfest?

2018-01-02 Thread Gerdan Rezende dos Santos
On Wed, 3 Jan 2018 at 00:53 Stephen Frost wrote: > Greetings, > > On the PG mailing lists, we'd prefer if you didn't top-post but instead > respond in-line (as I'll do below). > > * Gerdan Rezende dos Santos (ger...@gmail.com) wrote: > > I have interest in help with this. > > That's great! I too

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-01-02 Thread Rushabh Lathia
On Wed, Jan 3, 2018 at 9:11 AM, Peter Geoghegan wrote: > On Tue, Jan 2, 2018 at 1:38 AM, Rushabh Lathia > wrote: > > Need to do after the indexRelation build. So I added after update of > > pg_index, > > as indexRelation needed for plan_create_index_worders(). > > > > Attaching the separate patc

Re: copy_file_range is now a Linux kernel call

2018-01-02 Thread Tom Lane
Andres Freund writes: > On 2018-01-02 23:08:05 -0500, Tom Lane wrote: >> Bleah --- "rwnd" is unpronounceable and not an abbreviation we're >> currently using anywhere. If we go that way, let's brave carpal tunnel >> syndrome by calling it "rewind_copy_file_range". But I'm not that >> happy with

Re: Copyright update

2018-01-02 Thread Bruce Momjian
On Tue, Jan 2, 2018 at 04:49:28PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > I am ready to update the copyright notice on HEAD for 2018. Any > > objections? This shouldn't affect any pending patches since the > > copyright text is normally isolated at the top of the file. > > Sure, go

Re: copy_file_range is now a Linux kernel call

2018-01-02 Thread Andres Freund
Hi, On 2018-01-02 23:08:05 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2018-01-02 22:44:04 -0500, Tom Lane wrote: > > something like rwnd_copy_file_range or such. > Bleah --- "rwnd" is unpronounceable and not an abbreviation we're > currently using anywhere. If we go that way, let's b

Re: Observations in Parallel Append

2018-01-02 Thread Amit Kapila
On Wed, Dec 27, 2017 at 12:09 PM, Robert Haas wrote: > On Sun, Dec 24, 2017 at 8:37 PM, Amit Kapila wrote: >> >> Okay, but is it appropriate to use the parallel_divisor? The >> parallel_divisor means the contribution of all the workers (+ >> leader_contribution) whereas for non-partial paths the

Re: copy_file_range is now a Linux kernel call

2018-01-02 Thread Tom Lane
Andres Freund writes: > On 2018-01-02 22:44:04 -0500, Tom Lane wrote: >> Looks like we'd better rename our function. Anybody have an idea >> more creative than "pg_copy_file_range"? > I'd rather name it pg_rewind specific, OK ... > something like > rwnd_copy_file_range or such. Bleah --- "rwn

Re: [HACKERS] GnuTLS support

2018-01-02 Thread Peter Eisentraut
On 1/2/18 18:35, Michael Paquier wrote: > On Tue, Jan 02, 2018 at 10:35:16AM -0500, Peter Eisentraut wrote: >> I see a potential problem with the SCRAM channel binding support. >> GnuTLS will not support tls-server-endpoint, so we'll need to check what >> happens when a client requests that. (That

Re: copy_file_range is now a Linux kernel call

2018-01-02 Thread Andres Freund
Hi, On 2018-01-02 22:44:04 -0500, Tom Lane wrote: > Buildfarm member caiman just came back online after some time AWOL, and > it's not happy. The problem evidently is that pg_rewind's copy_file_range > function conflicts with a recently added Linux system call: > > http://man7.org/linux/man-page

copy_file_range is now a Linux kernel call

2018-01-02 Thread Tom Lane
Buildfarm member caiman just came back online after some time AWOL, and it's not happy. The problem evidently is that pg_rewind's copy_file_range function conflicts with a recently added Linux system call: http://man7.org/linux/man-pages/man2/copy_file_range.2.html Looks like we'd better rename

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-01-02 Thread Peter Geoghegan
On Tue, Jan 2, 2018 at 1:38 AM, Rushabh Lathia wrote: > Need to do after the indexRelation build. So I added after update of > pg_index, > as indexRelation needed for plan_create_index_worders(). > > Attaching the separate patch the same. This made it so that REINDEX and CREATE INDEX CONCURRENTLY

copy_file_range() conflict between pg_rewind and libc

2018-01-02 Thread Andres Freund
Hi, Animal caiman just revived and promptly failed: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=caiman&dt=2018-01-03%2003%3A13%3A54 copy_fetch.c:159:1: error: conflicting types for ‘copy_file_range’ copy_file_range(const char *path, off_t begin, off_t end, bool trunc) ^~

Re: FOR EACH ROW triggers on partitioned tables

2018-01-02 Thread Peter Eisentraut
On 12/29/17 17:53, Alvaro Herrera wrote: > This patch enables FOR EACH ROW triggers on partitioned tables. > > As presented, this patch is sufficient to discuss the semantics that we > want for triggers on partitioned tables, which is the most pressing > question here ISTM. This seems pretty stra

Re: CFM for January commitfest?

2018-01-02 Thread Stephen Frost
Greetings, On the PG mailing lists, we'd prefer if you didn't top-post but instead respond in-line (as I'll do below). * Gerdan Rezende dos Santos (ger...@gmail.com) wrote: > I have interest in help with this. That's great! I took your email to mean that you're interested in helping out, but no

Re: TODO list (was Re: Contributing with code)

2018-01-02 Thread David Rowley
On 3 January 2018 at 13:12, Patrick Krecker wrote: > As a person looking to become a postgres contributor, perhaps I can > offer some perspective on this. I think there is value in providing > *some* starting point for new contributors in the form of concrete > problems to solve. The value I hope

Re: CFM for January commitfest?

2018-01-02 Thread Stephen Frost
Tom, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Now that the January fest has nominally started, we need somebody > to act as CF manager. Any volunteers? > > (If someone already did volunteer and I missed it, my apologies.) With the list migrations more-or-less behind us, I'll volunteer to r

Re: Contributing with code

2018-01-02 Thread Stephen Frost
Noah, all, * Noah Misch (n...@leadboat.com) wrote: > On Tue, Jan 02, 2018 at 05:52:37PM -0500, Peter Eisentraut wrote: > > On 12/31/17 22:43, Craig Ringer wrote: > > > I'd rather rename it the "stuck, hard and abandoned projects list" ;)  > > > > That might actually be useful. > > +1. When I do

Re: TODO list (was Re: Contributing with code)

2018-01-02 Thread Stephen Frost
Greetings, * Patrick Krecker (pkrec...@gmail.com) wrote: > As a person looking to become a postgres contributor, perhaps I can > offer some perspective on this. I think there is value in providing > *some* starting point for new contributors in the form of concrete > problems to solve. The value I

Re: Deadlock in multiple CIC.

2018-01-02 Thread Alvaro Herrera
Jeff Janes wrote: > c3d09b3bd23f5f6 fixed it so concurrent CIC would not deadlock (or at least > not as reliably as before) by dropping its own snapshot before waiting for > all the other ones to go away. > > With commit 8aa3e47510b969354ea02a, concurrent CREATE INDEX CONCURRENTLY on > different t

Re: Package version in PG_VERSION and version()

2018-01-02 Thread Craig Ringer
On 3 January 2018 at 00:53, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 12/15/17 06:53, Christoph Berg wrote: > >> Why reinventing the wheel when there is already --with-extra-version > >> that you can use for the same purpose? > > That modifies the PG version number as such,

Re: Contributing with code

2018-01-02 Thread Noah Misch
On Tue, Jan 02, 2018 at 05:52:37PM -0500, Peter Eisentraut wrote: > On 12/31/17 22:43, Craig Ringer wrote: > > I'd rather rename it the "stuck, hard and abandoned projects list" ;)  > > That might actually be useful. +1. When I do refer to a TODO entry, it's usually because the entry bears a lis

Re: Ensuring hash tuples are properly maxaligned

2018-01-02 Thread Tom Lane
Andres Freund writes: > On 2018-01-02 20:40:50 -0500, Tom Lane wrote: >> OK, then there's not a live bug, but I'm a bit tempted to get rid of >> the data[] member anyway. It's not clear to me now that keeping it >> results in net cleaner code. Thoughts? > I like that plan. I don't think the dat

Re: Ensuring hash tuples are properly maxaligned

2018-01-02 Thread Andres Freund
On 2018-01-02 20:40:50 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2018-01-03 14:29:15 +1300, Thomas Munro wrote: > >> On Wed, Jan 3, 2018 at 2:20 PM, Tom Lane wrote: > >>> Andres Freund writes: > >>> But note that dsa_pointer can be wider than a regular pointer on > >>> platforms with

Re: CFM for January commitfest?

2018-01-02 Thread Gerdan Rezende dos Santos
I have interest in help with this. Gerdan Santos ger...@gmail.com On Tue, 2 Jan 2018 at 23:12 Joshua D. Drake wrote: > On 01/02/2018 05:06 PM, Ryan Murphy wrote: > > > > Now that the January fest has nominally started, we need somebody > > to act as CF manager. Any volunteers? > > > >

Re: Ensuring hash tuples are properly maxaligned

2018-01-02 Thread Tom Lane
Andres Freund writes: > On 2018-01-03 14:29:15 +1300, Thomas Munro wrote: >> On Wed, Jan 3, 2018 at 2:20 PM, Tom Lane wrote: >>> Andres Freund writes: >>> But note that dsa_pointer can be wider than a regular pointer on >>> platforms without atomics support. >>> Hm. I did not get that impressi

Re: Ensuring hash tuples are properly maxaligned

2018-01-02 Thread Andres Freund
On 2018-01-03 14:29:15 +1300, Thomas Munro wrote: > On Wed, Jan 3, 2018 at 2:20 PM, Tom Lane wrote: > > Andres Freund writes: > >> But note that dsa_pointer can be wider than a regular pointer on > >> platforms without atomics support. > > > > Hm. I did not get that impression from the comments

Re: Ensuring hash tuples are properly maxaligned

2018-01-02 Thread Thomas Munro
On Wed, Jan 3, 2018 at 2:20 PM, Tom Lane wrote: > Andres Freund writes: >> But note that dsa_pointer can be wider than a regular pointer on >> platforms without atomics support. > > Hm. I did not get that impression from the comments in dsa.h, > but if it's true then this approach won't work ---

Re: Enhance pg_stat_wal_receiver view to display connected host

2018-01-02 Thread Haribabu Kommi
On Fri, Dec 22, 2017 at 4:55 PM, Michael Paquier wrote: > On Fri, Dec 22, 2017 at 03:11:07PM +1100, Haribabu Kommi wrote: > > Updated patch attached with tests and doc changes. > > Thanks for the review. > + > + primary_hostname > + text > + Host name of the primary connected by

Re: Ensuring hash tuples are properly maxaligned

2018-01-02 Thread Tom Lane
Andres Freund writes: > On 2018-01-02 19:08:49 -0500, Tom Lane wrote: >> Now, the existing definition of the struct seems safe on all >> architectures we support, but it would not take much to break it. >> I think we ought to do what we did recently in the memory-context >> code: insert an explici

Re: CFM for January commitfest?

2018-01-02 Thread Joshua D. Drake
On 01/02/2018 05:06 PM, Ryan Murphy wrote: Now that the January fest has nominally started, we need somebody to act as CF manager.  Any volunteers? What are the responsibilities?  How many hours per week are typically given for this role? This might help: https://wiki.postgresql.or

Re: Ensuring hash tuples are properly maxaligned

2018-01-02 Thread Andres Freund
Hi, On 2018-01-02 19:08:49 -0500, Tom Lane wrote: > Now, the existing definition of the struct seems safe on all > architectures we support, but it would not take much to break it. > I think we ought to do what we did recently in the memory-context > code: insert an explicit padding calculation an

Re: CFM for January commitfest?

2018-01-02 Thread Ryan Murphy
> Now that the January fest has nominally started, we need somebody > to act as CF manager. Any volunteers? > > What are the responsibilities? How many hours per week are typically given for this role? Best, Ryan

Programmatically accessing selection predicates

2018-01-02 Thread Walter Cai
Hi, In order to run some cardinality estimation experiments I'm hoping to access the raw values for selections predicates from within the calc_joinrel_size_estimate method (in costsize.c). If possible, I would very much appreciate the help. Best, Walter

CFM for January commitfest?

2018-01-02 Thread Tom Lane
Now that the January fest has nominally started, we need somebody to act as CF manager. Any volunteers? (If someone already did volunteer and I missed it, my apologies.) regards, tom lane

Re: TODO list (was Re: Contributing with code)

2018-01-02 Thread Patrick Krecker
On Tue, Jan 2, 2018 at 3:42 PM, Joshua D. Drake wrote: > On 01/02/2018 11:17 AM, Robert Haas wrote: >> >> On Sun, Dec 31, 2017 at 2:31 PM, Peter Geoghegan wrote: >>> >>> On Sun, Dec 31, 2017 at 10:42 AM, Tom Lane wrote: If we're not going to maintain/curate it properly, I agree it's no

Ensuring hash tuples are properly maxaligned

2018-01-02 Thread Tom Lane
I've been poking around in the PHJ code trying to identify the reason why there are still so many buildfarm failures. I've not nailed it down yet, but one thing I did notice is that there's an entirely undocumented assumption that offsetof(HashMemoryChunkData, data) is maxalign'ed. If it isn't, t

Re: Contributing with code

2018-01-02 Thread Christopher Browne
On 2 January 2018 at 17:52, Peter Eisentraut wrote: > On 12/31/17 22:43, Craig Ringer wrote: >> I'd rather rename it the "stuck, hard and abandoned projects list" ;) > > That might actually be useful. Yep, agreed. Though it might do better to describe it in *slightly* more positive terms, and/or

Re: TODO list (was Re: Contributing with code)

2018-01-02 Thread Joshua D. Drake
On 01/02/2018 11:17 AM, Robert Haas wrote: On Sun, Dec 31, 2017 at 2:31 PM, Peter Geoghegan wrote: On Sun, Dec 31, 2017 at 10:42 AM, Tom Lane wrote: If we're not going to maintain/curate it properly, I agree it's not worth keeping it around. But I'd rather see somebody put some effort into i

Re: [HACKERS] GnuTLS support

2018-01-02 Thread Michael Paquier
On Tue, Jan 02, 2018 at 10:35:16AM -0500, Peter Eisentraut wrote: > I see a potential problem with the SCRAM channel binding support. > GnuTLS will not support tls-server-endpoint, so we'll need to check what > happens when a client requests that. (That's not the problem of this > patch, however.)

Re: Contributing with code

2018-01-02 Thread Peter Eisentraut
On 12/31/17 22:43, Craig Ringer wrote: > I'd rather rename it the "stuck, hard and abandoned projects list" ;)  That might actually be useful. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [HACKERS] SQL procedures

2018-01-02 Thread Peter Eisentraut
On 1/2/18 11:47, Tom Lane wrote: > +1 --- seems like a new bool column is the thing. Or may we should merge > "proisprocedure" with proisagg and proiswindow into an enum prokind? > Although that would break some existing client-side code. prokind sounds good. I'll look into that. -- Peter Eise

heads up: Fix for intel hardware bug will lead to performance regressions

2018-01-02 Thread Andres Freund
Hi, Upcoming versions of the linux kernel (and apparently also windows and others), will include new feature that apparently has been implemented with haste to work around an intel hardware bug. https://lwn.net/SubscriberLink/741878/eaff7b24627c41a2/ The fix, split userland / kernel pagetables,

Re: [HACKERS] SQL/JSON in PostgreSQL

2018-01-02 Thread Andrew Dunstan
On 01/02/2018 05:04 PM, Nikita Glukhov wrote: > > I have removed all extra features from the patch set, they can be > found in our > github repository: > https://github.com/postgrespro/sqljson/tree/sqljson_ext. > > Now there are 10 patches which have the following dependencies: > > 1: > 2: 1 > 3:

Re: [Patch] Checksums for SLRU files

2018-01-02 Thread Alexander Korotkov
On Mon, Jan 1, 2018 at 9:19 PM, Andrey Borodin wrote: > > 31 дек. 2017 г., в 22:30, Ivan Kartyshov > написал(а): > > > > Hello, I`d like to show my implementation of SLRU file protection with > checksums. > > . > > I would like to hear your thoughts over my patch. > > As far as I can see, th

Re: Copyright update

2018-01-02 Thread Tom Lane
Bruce Momjian writes: > I am ready to update the copyright notice on HEAD for 2018. Any > objections? This shouldn't affect any pending patches since the > copyright text is normally isolated at the top of the file. Sure, go for it. In the past we've often had to go back and clean up after pat

Re: [HACKERS] SQL/JSON in PostgreSQL

2018-01-02 Thread Oleg Bartunov
On Tue, Jan 2, 2018 at 8:39 PM, Andrew Dunstan wrote: > > > On 01/02/2018 02:44 PM, Oleg Bartunov wrote: >> On Tue, Jan 2, 2018 at 10:47 AM, Pavel Stehule >> wrote: > >>> I am looking on this patch set and it looks very well. >>> >>> Personally I dislike any extensions against SQL/JSON in this p

Copyright update

2018-01-02 Thread Bruce Momjian
I am ready to update the copyright notice on HEAD for 2018. Any objections? This shouldn't affect any pending patches since the copyright text is normally isolated at the top of the file. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprised

Re: [Patch] Make block and file size for WAL and relations defined at cluster creation

2018-01-02 Thread Robert Haas
On Sun, Dec 31, 2017 at 12:00 PM, Remi Colinet wrote: > Below patch makes block and file sizes defined at cluster creation for both > the WAL and the relations. This avoids having different server builds for > each possible combination of block size and file sizes.\ The email thread where we disc

Re: [HACKERS] SQL/JSON in PostgreSQL

2018-01-02 Thread Andrew Dunstan
On 01/02/2018 03:48 PM, Pavel Stehule wrote: > > > 2018-01-02 21:39 GMT+01:00 Andrew Dunstan > mailto:andrew.duns...@2ndquadrant.com>>: > > > > On 01/02/2018 02:44 PM, Oleg Bartunov wrote: > > On Tue, Jan 2, 2018 at 10:47 AM, Pavel Stehule > mailto:pavel.steh...@gmail.com>> wrote: > >

Re: [HACKERS] SQL/JSON in PostgreSQL

2018-01-02 Thread Pavel Stehule
2018-01-02 21:39 GMT+01:00 Andrew Dunstan : > > > On 01/02/2018 02:44 PM, Oleg Bartunov wrote: > > On Tue, Jan 2, 2018 at 10:47 AM, Pavel Stehule > wrote: > > >> I am looking on this patch set and it looks very well. > >> > >> Personally I dislike any extensions against SQL/JSON in this patch. An

Re: [HACKERS] SQL/JSON in PostgreSQL

2018-01-02 Thread Andrew Dunstan
On 01/02/2018 02:44 PM, Oleg Bartunov wrote: > On Tue, Jan 2, 2018 at 10:47 AM, Pavel Stehule > wrote: >> I am looking on this patch set and it looks very well. >> >> Personally I dislike any extensions against SQL/JSON in this patch. And >> there is lot of extensions there. It doesn't mean so

Re: [HACKERS] LDAPS

2018-01-02 Thread Thomas Munro
On Wed, Jan 3, 2018 at 5:31 AM, Peter Eisentraut wrote: > On 12/26/17 15:53, Peter Eisentraut wrote: >> This patch looks reasonable to me. I have also seen occasional requests >> for this in the field. >> >> If someone could test this on Windows, I think we could move ahead with it. Thanks for l

Re: [HACKERS] eval_const_expresisions and ScalarArrayOpExpr

2018-01-02 Thread Tom Lane
Dmitry Dolgov <9erthali...@gmail.com> writes: > I tried to experiment a bit with this patch, hope it may be helpful. Thanks for reviewing! I took your idea of just running pgbench results, and adapted it to these test cases: select * from test where 1 = 1 or 1 = 2; select * from test where 1 =

Re: TODO list (was Re: Contributing with code)

2018-01-02 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Sun, Dec 31, 2017 at 1:51 PM, Stephen Frost wrote: > > The todo entry even talks about why it's difficult to do and what the > > expected way to go about doing it is (that is, connect to each database > > that has objects in the tablespace

Re: TODO list (was Re: Contributing with code)

2018-01-02 Thread Robert Haas
On Sun, Dec 31, 2017 at 2:02 PM, David G. Johnston wrote: > It probably needs three sub-sections. Fist the raw ideas put forth by > people not capable of implementation but needing capabilities; these get > moved to one of two sections: ideas that have gotten some attention by core > that have me

Re: [HACKERS] SQL/JSON in PostgreSQL

2018-01-02 Thread Oleg Bartunov
On Tue, Jan 2, 2018 at 10:47 AM, Pavel Stehule wrote: > > > 2018-01-02 3:04 GMT+01:00 Nikita Glukhov : >> >> On 29.11.2017 05:24, Michael Paquier wrote: >> >>> On Wed, Nov 15, 2017 at 10:17 AM, Nikita Glukhov >>> wrote: Attached the new version of the patches where displaying of SQL/JSO

Re: [HACKERS] SQL procedures

2018-01-02 Thread Andrew Dunstan
On 01/02/2018 02:14 PM, Robert Haas wrote: > On Tue, Jan 2, 2018 at 1:57 PM, Andrew Dunstan > wrote: >> Yeah, but these things don't feel like they belong in the same category. >> The fact that we have to ask this question is a symptom of that. > Well, that's got to be asked about any representa

Re: TODO list (was Re: Contributing with code)

2018-01-02 Thread Robert Haas
On Sun, Dec 31, 2017 at 1:51 PM, Stephen Frost wrote: > The todo entry even talks about why it's difficult to do and what the > expected way to go about doing it is (that is, connect to each database > that has objects in the tablespace and query it to find out what's in > the tablespace). Craig'

Re: TODO list (was Re: Contributing with code)

2018-01-02 Thread Robert Haas
On Sun, Dec 31, 2017 at 2:31 PM, Peter Geoghegan wrote: > On Sun, Dec 31, 2017 at 10:42 AM, Tom Lane wrote: >> If we're not going to maintain/curate it properly, I agree it's not >> worth keeping it around. But I'd rather see somebody put some effort >> into it ... > > If somebody was going to r

Re: [HACKERS] SQL procedures

2018-01-02 Thread Robert Haas
On Tue, Jan 2, 2018 at 1:57 PM, Andrew Dunstan wrote: > Yeah, but these things don't feel like they belong in the same category. > The fact that we have to ask this question is a symptom of that. Well, that's got to be asked about any representation we choose - that question is the motivation for

Re: [HACKERS] SQL procedures

2018-01-02 Thread Andrew Dunstan
On 01/02/2018 01:45 PM, Robert Haas wrote: > On Tue, Jan 2, 2018 at 11:47 AM, Tom Lane wrote: >>> Anyway, I think it would be better to invent an explicit way to >>> represent whether something is a procedure rather than relying on >>> overloading prorettype to tell us. >> +1 --- seems like a ne

Re: [HACKERS] SQL procedures

2018-01-02 Thread Robert Haas
On Tue, Jan 2, 2018 at 11:47 AM, Tom Lane wrote: >> Anyway, I think it would be better to invent an explicit way to >> represent whether something is a procedure rather than relying on >> overloading prorettype to tell us. > > +1 --- seems like a new bool column is the thing. Or may we should mer

Re: [PATCH] GET DIAGNOSTICS FUNCTION_NAME

2018-01-02 Thread Peter Eisentraut
On 12/31/17 11:57, Tom Lane wrote: > 3. In connection with #2, I'm dubious that FUNCTION_NAME is le mot > juste, because that would seem to imply that it is just the name, > which it isn't. If we stick with the regprocedureout semantics > I'd be inclined to propose FUNCTION_SIGNATURE. The SQL sta

Re: AS OF queries

2018-01-02 Thread Peter Eisentraut
On 12/29/17 06:28, Konstantin Knizhnik wrote: >> Can there be apparent RI >> violations? > Right now AS OF is used only in selects, not in update statements. So I > do not understand how integrity constraints can be violated. I mean, if you join tables connected by a foreign key, you can expect

Re: [PATCH] Logical decoding of TRUNCATE

2018-01-02 Thread Marco Nenciarini
Hi, Il 29/12/17 20:55, Andres Freund ha scritto: > Hi, > > On 2017-12-29 14:15:22 +0100, Marco Nenciarini wrote: >> This patch implements support for TRUNCATE statements >> in logical replication. The work has mainly done by Simon Riggs then >> finished by me. Tests are written by me. >> >> TRUNC

Re: [HACKERS] SQL procedures

2018-01-02 Thread Pavel Stehule
2018-01-02 17:47 GMT+01:00 Tom Lane : > Robert Haas writes: > > I agree that we need this, but using prorettype = InvalidOid to do it > > might not be the best way, because it only works for procedures that > > don't return anything. If a procedure could return, say, an integer, > > Good point,

Re: Add default role 'pg_access_server_files'

2018-01-02 Thread Stephen Frost
Magnus, * Magnus Hagander (mag...@hagander.net) wrote: > On Tue, Jan 2, 2018 at 1:08 PM, Stephen Frost wrote: > > * Magnus Hagander (mag...@hagander.net) wrote: > > > On Sun, Dec 31, 2017 at 8:19 PM, Stephen Frost > > wrote: > > > > This patch adds a new default role called 'pg_access_server_fil

Re: Add default role 'pg_access_server_files'

2018-01-02 Thread Magnus Hagander
On Tue, Jan 2, 2018 at 1:08 PM, Stephen Frost wrote: > Magnus, > > * Magnus Hagander (mag...@hagander.net) wrote: > > On Sun, Dec 31, 2017 at 8:19 PM, Stephen Frost > wrote: > > > This patch adds a new default role called 'pg_access_server_files' > which > > > allows an administrator to GRANT to

Re: Package version in PG_VERSION and version()

2018-01-02 Thread Peter Eisentraut
On 12/15/17 06:53, Christoph Berg wrote: >> Why reinventing the wheel when there is already --with-extra-version >> that you can use for the same purpose? > That modifies the PG version number as such, as what psql is showing > on connect. I'd think that is too intrusive. > > And it doesn't work a

Re: [HACKERS] SQL procedures

2018-01-02 Thread Tom Lane
Robert Haas writes: > I agree that we need this, but using prorettype = InvalidOid to do it > might not be the best way, because it only works for procedures that > don't return anything. If a procedure could return, say, an integer, Good point, because that is possible in some other systems, an

Re: PATCH: Configurable file mode mask

2018-01-02 Thread David Steele
Hi Robert, Thanks for looking at the patches. On 12/31/17 1:27 PM, Robert Haas wrote: On Thu, Dec 28, 2017 at 2:36 PM, David Steele wrote: Attached is a new patch set that should address various concerns raised in this thread. 1) group-access-v3-01-mkdir.patch Abstracts all mkdir calls in t

Re: [HACKERS] SQL procedures

2018-01-02 Thread Robert Haas
On Wed, Nov 8, 2017 at 9:21 AM, Peter Eisentraut wrote: >> Why not use VOIDOID for the prorettype value? > > We need a way to distinguish functions that are callable by SELECT and > procedures that are callable by CALL. I agree that we need this, but using prorettype = InvalidOid to do it might n

Re: [HACKERS] LDAPS

2018-01-02 Thread Peter Eisentraut
On 12/26/17 15:53, Peter Eisentraut wrote: > This patch looks reasonable to me. I have also seen occasional requests > for this in the field. > > If someone could test this on Windows, I think we could move ahead with it. A small point on the test changes. You change the test under "diagnostic

Re: Better testing coverage and unified coding for plpgsql loops

2018-01-02 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> However, while I was doing that, it seemed like the tests I was adding >> were mighty repetitive, as many of them were just exactly the same thing >> adjusted for a different kind of loop statement. And so I began to wonder >> why it was that we had fiv

Re: [PATCH] session_replication_role = replica with TRUNCATE

2018-01-02 Thread Marco Nenciarini
Hi, Il 30/12/17 08:42, Craig Ringer ha scritto: > On 30 December 2017 at 03:32, Petr Jelinek > wrote: > > On 29/12/17 16:53, Marco Nenciarini wrote: > > Il 29/12/17 15:14, Petr Jelinek ha scritto: > >> > >> May be worth documenting that the se

Re: [HACKERS] Fix performance degradation of contended LWLock on NUMA

2018-01-02 Thread Jesper Pedersen
Hi, On 11/27/2017 07:41 AM, Юрий Соколов wrote: I looked at assembly, and remembered, that last commit simplifies `init_local_spin_delay` to just two-three writes of zeroes (looks like compiler combines 2*4byte write into 1*8 write). Compared to code around (especially in LWLockAcquire itself),

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-02 Thread Alvaro Herrera
Jesper Pedersen wrote: > On 12/22/2017 10:10 AM, Alvaro Herrera wrote: > > If you have wording suggestions for the doc changes, please send them > > along. > > Maybe we should make the default index name more explicit under the 'name' > parameter as attached. I'm -0.2 on documenting this. In g

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-02 Thread Jesper Pedersen
Hi Alvaro, On 12/29/2017 12:59 PM, Alvaro Herrera wrote: This seems to work pretty well, much to my surprise. I was a bit scared of adding a new deptype, but actually the only affected code is findDependentObjects() and the semantics of the new type is a subset of the existing DEPTYPE_INTERNAL,

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-02 Thread Jesper Pedersen
Hi Alvaro, On 12/22/2017 10:10 AM, Alvaro Herrera wrote: I believe these are all fixed by the attached delta patch. Thanks. If you have wording suggestions for the doc changes, please send them along. Maybe we should make the default index name more explicit under the 'name' parameter a

Re: [HACKERS] GnuTLS support

2018-01-02 Thread Peter Eisentraut
On 11/26/17 20:05, Andreas Karlsson wrote: > I have now implemented this in the attached patch (plus added support > for channel binding and rebased it) but I ran into one issue which I > have not yet solved. The script for the windows version takes the > --with-openssl= switch so that cannot ju

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2018-01-02 Thread Shubham Barai
On 2 October 2017 at 22:21, Alexander Korotkov wrote: > On Sun, Oct 1, 2017 at 11:53 AM, Shubham Barai > wrote: > >> Yes, page-level predicate locking should happen only when fast update is >> off. >> Actually, I forgot to put conditions in updated patch. Does everything >> else look ok ? >> > >

Re: Better testing coverage and unified coding for plpgsql loops

2018-01-02 Thread Tom Lane
Alvaro Herrera writes: > Darafei "Komяpa" Praliaskouski wrote: >> - can this macro become a function? > The "exit_action" argument makes it tough. It can probably be done -- > it seems to require contorting the one callsite that uses "goto" though. It could be converted into a function returnin

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2018-01-02 Thread Peter Eisentraut
On 12/22/17 23:57, Tomas Vondra wrote: > PART 1: adding logical_work_mem memory limit (0001) > --- The documentation in this patch contains some references to later features (streaming). Perhaps that could be separated so that the patches can be app

Re: [HACKERS] Re: [HACKERS] generated columns

2018-01-02 Thread Peter Eisentraut
On 12/31/17 12:54, Joe Conway wrote: > Anyway, I have seen requests for change data capture > (https://en.wikipedia.org/wiki/Change_data_capture) in Postgres which is > apparently available in our competition without requiring the use of > triggers. Perhaps that is yet a different feature, but I wa

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

2018-01-02 Thread Peter Eisentraut
On 11/11/17 05:50, Graham Leggett wrote: > 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 i

Re: pg_(total_)relation_size and partitioned tables

2018-01-02 Thread Alvaro Herrera
Peter Eisentraut wrote: > But what are the uses for dealing with partial partition hierarchies? > How easy do we need to make that? If you have multilevel partitioning, say partitions per year per site. What is the volume of 2017 compared to 2016, on each site? I don't think it needs to be super

Re: Faster inserts with mostly-monotonically increasing values

2018-01-02 Thread Tels
Moin, On Tue, January 2, 2018 7:51 am, Pavan Deolasee wrote: > On Sun, Dec 31, 2017 at 4:36 PM, Peter Geoghegan wrote: > >> On Sun, Dec 31, 2017 at 6:44 AM, Pavan Deolasee >> wrote: >> > Here is a patch that implements the idea. If the last insert happens >> to >> be >> > in the rightmost block

Re: Better testing coverage and unified coding for plpgsql loops

2018-01-02 Thread Alvaro Herrera
Darafei "Komяpa" Praliaskouski wrote: > - how do currently existing coverage tools display coverage for such a > large macro? > > I expect DEFINE's to be treated as comments. It is, but then it is counted in the callsite where each branch is displayed separately. So in https://coverage.postgre

Re: pg_(total_)relation_size and partitioned tables

2018-01-02 Thread Peter Eisentraut
On 12/28/17 16:24, David Rowley wrote: >> select pg_partition_root(c.oid), c.relname, pg_table_size(c.oid) >> from pg_class c >> order by 1 >> >> select pg_partition_root(c.oid), sum(pg_table_size(c.oid)) >> from pg_class c >> group by 1 > > That seems much nicer. I assume "root" would mea

Re: How to Works with Centos

2018-01-02 Thread Devrim Gündüz
Hi, On Mon, 2017-12-25 at 16:39 +0200, Benyamin Guedj wrote: > Is working with the default distribution’s version (9.2) really the “best > practice”, even though it is no longer supported? Red Hat / CentOS also provides PostgreSQL 9.6 (and 9.5, IIRC), via SCL. I mean, those versions are also "su

Re: Better testing coverage and unified coding for plpgsql loops

2018-01-02 Thread Komяpa
Hello! > However, while I was doing that, it seemed like the tests I was adding > were mighty repetitive, as many of them were just exactly the same thing > adjusted for a different kind of loop statement. And so I began to wonder > why it was that we had five copies of the RC_FOO management logi

Re: Faster inserts with mostly-monotonically increasing values

2018-01-02 Thread Pavan Deolasee
On Sun, Dec 31, 2017 at 4:36 PM, Peter Geoghegan wrote: > On Sun, Dec 31, 2017 at 6:44 AM, Pavan Deolasee > wrote: > > Here is a patch that implements the idea. If the last insert happens to > be > > in the rightmost block of an index, then we cache the block and check > that > > first for the n

Re: Better testing coverage and unified coding for plpgsql loops

2018-01-02 Thread Alvaro Herrera
Tom Lane wrote: > However, while I was doing that, it seemed like the tests I was adding > were mighty repetitive, as many of them were just exactly the same thing > adjusted for a different kind of loop statement. And so I began to wonder > why it was that we had five copies of the RC_FOO manage

Re: Add default role 'pg_access_server_files'

2018-01-02 Thread Stephen Frost
Magnus, * Magnus Hagander (mag...@hagander.net) wrote: > On Sun, Dec 31, 2017 at 8:19 PM, Stephen Frost wrote: > > This patch adds a new default role called 'pg_access_server_files' which > > allows an administrator to GRANT to a non-superuser role the ability to > > access server-side files thro

Re: [HACKERS] why not parallel seq scan for slow functions

2018-01-02 Thread Amit Kapila
On Fri, Dec 29, 2017 at 7:56 PM, Marina Polyakova wrote: > Hello everyone in this thread! > > On 29-11-2017 8:01, Michael Paquier wrote: >> >> Moved to next CF for extra reviews. > > > Amit, I would like to ask some questions about your patch (and can you > please rebase it on the top of the maste

Re: [HACKERS] UPDATE of partition key

2018-01-02 Thread Amit Khandekar
On 16 December 2017 at 03:09, Robert Haas wrote: > > - map = ptr->partition_tupconv_maps[leaf_part_index]; > + map = ptr->parentchild_tupconv_maps[leaf_part_index]; > > I don't think there's any reason to rename this. In previous patch > versions, you had multiple arrays of tuple conversion maps

Re: [HACKERS] SQL/JSON in PostgreSQL

2018-01-02 Thread Pavel Stehule
Hi regress tests fails Regards Pavel regression.diffs Description: Binary data

  1   2   >