Re: [HACKERS] pg_dump / copy bugs with "big lines" ?

2016-02-29 Thread Alvaro Herrera
A customer of ours was hit by this recently and I'd like to get it fixed for good. Robert Haas wrote: > On Mon, Apr 6, 2015 at 1:51 PM, Jim Nasby wrote: > > In any case, I don't think it would be terribly difficult to allow a bit > > more than 1GB in a StringInfo. Might need to tweak palloc too;

Re: [HACKERS] [COMMITTERS] pgsql: Add isolationtester spec for old heapam.c bug

2016-02-29 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> guaibasaurus is not a particularly slow machine, and it's not using any > >> special build flags AFAICT. So I'm not sure what to make of this case, > >> except that it proves th

Re: [HACKERS] Minor typo in syncrep.c

2016-02-29 Thread Alvaro Herrera
Amit Langote wrote: > On 2016/02/03 17:50, Amit Langote wrote: > > Attached patch removes an extraneous word in the comment above > > I kept reading and found one place in a comment within the function where > a word is most probably missing, Attached fixes it. Pushed both, thanks. -- Álvaro H

Re: [HACKERS] [REVIEW] In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-02-29 Thread Alvaro Herrera
Michael Paquier wrote: > 9) I have no logical explanation to explain why I am seeing all those > things now. Happens all the time ... Pushed, thanks. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent vi

Re: [HACKERS] Patch to install config/missing

2016-02-29 Thread Alvaro Herrera
Tom Lane wrote: > Given our inability to come to a consensus on rejiggering the uses of > "missing", I think maybe we should just apply the original patch and > call it good. For the record: Tom applied this patch as commit dccf8e9e608824ce15. -- Álvaro Herrerahttp://www.2ndQuad

Re: [HACKERS] [PATCH] Logical decoding support for sequence advances

2016-02-29 Thread Alvaro Herrera
Petr Jelinek wrote: > I wonder if it would be acceptable to create new info flag for RM_SEQ_ID > that would behave just like XLOG_SEQ_LOG but would be used only for the > nontransactional updates (nextval) so that decoding could easily > differentiate between transactional and non-transactional up

Re: [HACKERS] Re: In-core regression tests for replication, cascading, archiving, PITR, etc.

2016-03-01 Thread Alvaro Herrera
Michael Paquier wrote: > On Tue, Mar 1, 2016 at 5:13 PM, Kyotaro HORIGUCHI > wrote: > + return wantarray ? ($stdout, $stderr) : $stdout; > So you are willing to extend that so as you could perform conparison > tests on the error strings returned. Why no, it looks useful, though > now there is n

Re: [HACKERS] Addition of extra commit fest entry to park future patches

2016-03-01 Thread Alvaro Herrera
Magnus Hagander wrote: > On Tue, Mar 1, 2016 at 8:09 AM, Michael Paquier > wrote: > > > Hi all, > > > > I guess that commit fest 2016-03 is going to begin soon, at which > > point nobody will be able to add new patches because > > 1) already closed CF don't accept them. > > 2) A CF currently runn

Re: Commitfest Bug (was: [HACKERS] Re: Reusing abbreviated keys during second pass of ordered [set] aggregates)

2016-03-01 Thread Alvaro Herrera
Magnus Hagander wrote: > On Tue, Feb 16, 2016 at 11:12 PM, Pavel Stehule > wrote: > > This behave is pretty unpleasant and frustrating. > > Well, it's in no way a bug, because it's the behavior we agreed upon at the > time :) I guess the "move to next CF" operation is new enough that we didn't y

Re: [HACKERS] Confusing with commit time usage in logical decoding

2016-03-01 Thread Alvaro Herrera
Artur Zakirov wrote: > Hello, Andres > > You have introduced a large replication progress tracking infrastructure > last year. And there is a problem described at the link in the quote below. > > Attached patch fix this issue. Is this patch correct? I will be grateful if > it is and if it will be

Re: [HACKERS] Confusing with commit time usage in logical decoding

2016-03-01 Thread Alvaro Herrera
Petr Jelinek wrote: > On 01/03/16 17:57, Alvaro Herrera wrote: > >Artur Zakirov wrote: > >>Hello, Andres > >> > >>You have introduced a large replication progress tracking infrastructure > >>last year. And there is a problem described at the link in

Re: [HACKERS] Confusing with commit time usage in logical decoding

2016-03-01 Thread Alvaro Herrera
Andres Freund wrote: > I'd rather just initialize commit_time to parsed->xact_time. That also works. Probably also change its declaration to actually be TimestampTz ... > This indeed is clearly a bug. I do wonder if anybody has a good idea > about how to add regression tests for this? It's rath

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-01 Thread Alvaro Herrera
Craig Ringer wrote: > Hi all > > I've been working with the new TAP tests for recovery and have a number of > enhancements I'd like to make to the tooling to make writing tests easier > and nicer. I think we should change the existing psql method to be what you propose as psql_expert. I don't se

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-01 Thread Alvaro Herrera
Just pushed 0006. -- Álvaro Herrerahttp://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/pg

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-01 Thread Alvaro Herrera
Craig Ringer wrote: > diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm > index 3d11cbb..8c13655 100644 > --- a/src/test/perl/TestLib.pm > +++ b/src/test/perl/TestLib.pm > @@ -112,9 +112,11 @@ INIT > # > sub tempdir > { > + my ($prefix) = @_; > + $prefix = "tmp_test" if (

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-01 Thread Alvaro Herrera
Tom Lane wrote: > I wrote: > > Can't use string ("Test::Builder") as a HASH ref while "strict refs" in use > > at /usr/share/perl5/Test/Builder.pm line 1798. > > > The referenced line number is the end of the file, > > Oh, scratch that; I was looking at the wrong file. Actually, > /usr/share/pe

Re: [HACKERS] WIP: Upper planner pathification

2016-03-02 Thread Alvaro Herrera
Simon Riggs wrote: > ISTM that we are clearly "going for it"; everybody agrees we should apply > the patch now. > > The longer we hold off on applying it, the longer we wait for dependent > changes. Agreed -- we need this in tree as soon as realistically possible. There is a a bit a problem her

Re: [HACKERS] create opclass documentation outdated

2016-03-02 Thread Alvaro Herrera
Tom Lane wrote: > I'm inclined to feel that the right answer is to fix all these > omissions, not to decide that we're not maintaining this documentation > anymore. Alvaro, I think this one's in your court. Will fix. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Devel

Re: [HACKERS] pg_dump / copy bugs with "big lines" ?

2016-03-02 Thread Alvaro Herrera
Daniel Verite wrote: > The cause of the crash turns out to be, in enlargeStringInfo(): > > needed += str->len + 1; /* total space required now */ > > needed is an int and str->len is an int64, so it overflows when the > size has to grow beyond 2^31 bytes, fails to enlarge the buffer and >

Re: [HACKERS] create opclass documentation outdated

2016-03-02 Thread Alvaro Herrera
Tom Lane wrote: > In create_opclass.sgml, not only do we have the list of AMs supporting > STORAGE, but there is also a paragraph describing which AMs do what > for input datatypes of FUNCTION members (around line 175). I placed BRIN together with gist/gin/spgist here, namely that the optype defa

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-02 Thread Alvaro Herrera
Shulgin, Oleksandr wrote: > Alright. I'm attaching the latest version of this patch split in two > parts: the first one is NULLs-related bugfix and the second is the > "improvement" part, which applies on top of the first one. So is this null-related bugfix supposed to be backpatched? (I assume

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-02 Thread Alvaro Herrera
Craig Ringer wrote: > On 2 March 2016 at 07:07, Alvaro Herrera wrote: > > > Craig Ringer wrote: > > > > > diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm > > > index 3d11cbb..8c13655 100644 > > > --- a/src/test/perl/TestLib.pm > &g

Re: [HACKERS] On columnar storage (2)

2016-03-03 Thread Alvaro Herrera
Bert wrote: > Alvaro, > You wrote that a wiki page would be opened regarding this. But I still > cannot find such a page (expect for an old page which hasn't changed in the > last year). Is there already something we can look at? Yeah, I haven't done that yet. I will post here as soon as I get t

Re: [HACKERS] On columnar storage (2)

2016-03-03 Thread Alvaro Herrera
Haribabu Kommi wrote: > The performance report is taken on the patch that is WIP columnar storage > on PostgreSQL database. Only the storage part of the code is finished. > To test the performance, we used custom plan to generate the plans > where it can use the columnar storage. This way we ran t

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-03 Thread Alvaro Herrera
Craig Ringer wrote: > On 3 March 2016 at 21:16, Michael Paquier wrote: > > > The rest are feature patches: > > > 004 allows filtering on RecursiveCopy by a predicate function. Needed for > > > filesystem level backups (007). It could probably be squashed with 007 if > > > desired. > > > > Adding

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-03 Thread Alvaro Herrera
Tom Lane wrote: > Yeah. At this point, the earliest the cmake work could land is 9.7, > and TBH I do not think we are committed to landing it at all. So it'd > behoove us to fix at least HEAD, and probably older branches too, > to work with up-to-date MSVC. In that case we should probably add t

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-03 Thread Alvaro Herrera
Craig Ringer wrote: > The first three are simple fixes that should go in without fuss: > > 001 fixes the above 5.8.8 compat issue. > > 002 fixes another minor whoopsie, a syntax error in src/test/recovery/t/ > 003_recovery_targets.pl that never got noticed because exit codes are > ignored. >

Re: [HACKERS] pgbench stats per script & other stuff

2016-03-03 Thread Alvaro Herrera
I looked at 19.d and I think the design has gotten pretty convoluted. I think we could simplify with the following changes: struct script_t gets a new member, of type Command **, which is initially null. function process_builtin receives the complete script_t (not individual memebers of it) cons

Re: [HACKERS] pgbench stats per script & other stuff

2016-03-03 Thread Alvaro Herrera
Michael Paquier wrote: > On Tue, Feb 9, 2016 at 4:22 AM, Fabien COELHO wrote: > > Hmmm, I type them and I'm not so good with a keyboard, so "se" is better > > than: > > > > "selct-onlyect-only". > > I can understand that feeling. Pushed 19-e, thanks. -- Álvaro Herrerahttp://ww

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-04 Thread Alvaro Herrera
Michael Paquier wrote: > - 0001, as mentioned by Petr upthread, psed is removed from the core > distribution of Perl in 5.22, so when installing ActivePerl it is not > possible to create probes.h, and the code compilation would fail. I > bumped into that so here is a patch. What I am proposing her

Re: [HACKERS] pgbench small bug fix

2016-03-04 Thread Alvaro Herrera
Aleksander Alekseev wrote: > > Attached is a v3 which test integers more logically. I'm a lazy > > programmer who tends to minimize the number of key strokes. > > Well. From what I can tell this patch is Ready for Committer. I'm not a fan of this approach either. Would it be too complicated if

Re: [HACKERS] postgres_fdw vs. force_parallel_mode on ppc

2016-03-04 Thread Alvaro Herrera
Tom Lane wrote: > Robert Haas writes: > > Sure. If you have an idea what the right thing to do is, please go > > ahead. > > Yeah, I'll modify the patch and commit sometime later today. > > > I actually don't have a clear idea what's going on here. I > > guess it's that the wait_for_stats() gua

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-03-04 Thread Alvaro Herrera
I would like to have a patch for this finalized today, so that we can apply to master before or during the weekend; with it in the tree for about a week we can be more confident and backpatch close to next weekend, so that we see it in the next set of minor releases. Does that sound good? -- Álv

Re: [HACKERS] Equivalent of --enable-tap-tests in MSVC scripts

2016-03-04 Thread Alvaro Herrera
Craig Ringer wrote: > If it's the result of perltidy changing its mind about the formatting as a > result of this change I guess we have to eyeroll and live with it. perltidy > leaves the file alone as it is in the tree currently, so that be it. > > Gripe withdrawn, ready for committer IMO Okay,

Re: [HACKERS] postgres_fdw vs. force_parallel_mode on ppc

2016-03-04 Thread Alvaro Herrera
Robert Haas wrote: > I'm not sure if that's actually true with parallel mode. I'm pretty > sure the earlier workers will have terminated before the later ones > start, but is that enough to guarantee that the stats collector sees > the messages in that order? Um. So if you have two queries that

Re: [HACKERS] psql completion for ids in multibyte string

2016-03-04 Thread Alvaro Herrera
Robert Haas wrote: > On Wed, Mar 2, 2016 at 8:07 PM, Kyotaro HORIGUCHI > wrote: > > Hello, thank you for the comments. > >> I think we should leave string_length as it is and use a new variable > >> for character-based length, as in the attached. > > > > Basically agreed but I like byte_length for

Re: [HACKERS] pgbench stats per script & other stuff

2016-03-04 Thread Alvaro Herrera
Fabien COELHO wrote: Hi, > *-21.patch does what you suggested above, some hidden awkwardness > but much less that the previous one. Yeah, I think this is much nicer, don't you agree? However, this is still a bit broken -- you cannot return a stack variable from process_file, because the

Re: [HACKERS] pgbench small bug fix

2016-03-04 Thread Alvaro Herrera
Fabien COELHO wrote: > Probably it is possible, but it will sure need more that one little > condition to be achieved... I do not think that introducing a non trivial > distributed election algorithm involving locks and so would be a good > decision for this very little matter. > > My advice is "

Re: [HACKERS] pgbench stats per script & other stuff

2016-03-04 Thread Alvaro Herrera
Fabien COELHO wrote: > >However, this is still a bit broken -- you cannot return a stack > >variable from process_file, because the stack goes away once the > >function returns. You need to malloc it. > > That is why the "fs" variable in process_file is declared "static", and why > I wrote "some

Re: [HACKERS] pgbench small bug fix

2016-03-04 Thread Alvaro Herrera
Fabien COELHO wrote: > > >>Probably it is possible, but it will sure need more that one little > >>condition to be achieved... I do not think that introducing a non trivial > >>distributed election algorithm involving locks and so would be a good > >>decision for this very little matter. > >> > >>

Re: [HACKERS] Relaxing SSL key permission checks

2016-03-04 Thread Alvaro Herrera
Christoph Berg wrote: > Re: To Tom Lane 2016-02-19 <20160219115334.gb26...@msg.df7cb.de> > > Updated patch attached. > > *Blush* I though I had compile-tested the patch, but without > --enable-openssl it wasn't built :(. > > The attached patch has successfully been included in the 9.6 Debian > pa

Re: [HACKERS] Performance improvement for joins where outer side is unique

2016-03-04 Thread Alvaro Herrera
I wonder why do we have two identical copies of clause_sides_match_join ... -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes t

Re: [HACKERS] Fix handling of invalid sockets returned by PQsocket()

2016-03-05 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 2/17/16 10:52 PM, Michael Paquier wrote: > > On Thu, Feb 18, 2016 at 1:58 AM, Alvaro Herrera > > wrote: > >> Michael Paquier wrote: > >>> Hi all, > >>> > >>> After looking at Alvaro's message mentioning

Re: [HACKERS] Optimizer questions

2016-03-08 Thread Alvaro Herrera
Tom Lane wrote: > Konstantin Knizhnik writes: > > Attached please find improved version of the optimizer patch for LIMIT > > clause. > For now, I've set this commitfest entry to Waiting on Author. There's > still time to consider a rewrite in this 'fest, if you can get it done > in a week or tw

Re: [HACKERS] Recovery test failure for recovery_min_apply_delay on hamster

2016-03-08 Thread Alvaro Herrera
Michael Paquier wrote: > On Wed, Mar 2, 2016 at 2:04 PM, Michael Paquier > wrote: > > Here are a couple of ways to address this problem: > > 1) Remove the check before applying the delay > > 2) Increase recovery_min_apply_delay to a time that will allow even > > slow machines to see a difference.

Re: [HACKERS] Odd warning from pg_dump

2016-03-08 Thread Alvaro Herrera
Tom Lane wrote: > Stephen Frost writes: > > I think the real question is if "-n '*'" should still exclude > > 'pg_catalog'. Fixing the issue with defined pseudo types is wonderful, > > but aren't you going to end up with a dump you can't restore, > > regardless? > > Yeah, perhaps so. The thread

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-08 Thread Alvaro Herrera
Shulgin, Oleksandr wrote: > Alright. I'm attaching the latest version of this patch split in two > parts: the first one is NULLs-related bugfix and the second is the > "improvement" part, which applies on top of the first one. I went over patch 0001 and it seems pretty reasonable. It's missing

Re: [HACKERS] Allowing to run a buildfarm animal under valgrind

2016-03-08 Thread Alvaro Herrera
Andres Freund wrote: > I do wonder if adding a PGCTLPOSTGRESWRAPPER or something to pg_ctl > would be ok. That'd just supplant calling the postgres binary, making > all this easier. This seems a reasonably principled way to go about this. Eventually we might plug other things in it ... -- Álva

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-08 Thread Alvaro Herrera
Robert Haas wrote: > Let's yank 'em. This is a minor issue which is distracting us from > the main point of this patch, and I don't think it's worth getting > distracted. +1 > I'm pretty meh about the whole idea of this function, though, > actually, and I don't see a single clear +1 vote for th

Re: [HACKERS] pgcrypto: add s2k-count

2016-03-08 Thread Alvaro Herrera
Jeff Janes wrote: > pgcrypto supports s2k-mode for key-stretching during symmetric > encryption, and even defaults to s2k-mode=3, which means configurable > iterations. But it doesn't support s2k-count to actually set those > iterations to be anything other than the default. If you are > interest

Re: [HACKERS] Recovery test failure for recovery_min_apply_delay on hamster

2016-03-08 Thread Alvaro Herrera
Michael Paquier wrote: > On Wed, Mar 9, 2016 at 12:14 AM, Alvaro Herrera > wrote: > > Is there anything we can do to short-circuit the wait in the case that > > replication happens promptly? A one-minute wait would be acceptable we > > terminate it early by checking

Re: [HACKERS] multivariate statistics v11

2016-03-09 Thread Alvaro Herrera
Hi, I gave a very quick skim to patch 0002. Not a real review yet. But there are a few trivial points to fix: * You still have empty sections in the SGML docs (such as the EXAMPLES). I suppose the syntax is now firm enough that we can get some. (I looked at the other patches to see whether it

Re: [HACKERS] WIP: Access method extendability

2016-03-09 Thread Alvaro Herrera
Hi. As I just said to Tomas Vondra: since your patch creates a new object type, please make sure to add a case to cover it in the object_address.sql test. That verifies some things such as pg_identify_object and related. Thanks, -- Álvaro Herrerahttp://www.2ndQuadrant.com/ Post

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-09 Thread Alvaro Herrera
Tomas Vondra wrote: > FWIW while looking at the code I noticed that we skip wide varlena > values but not cstrings. Seems a bit suspicious. Uh, can you actually have columns of cstring type? I don't think you can ... -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Devel

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-03-09 Thread Alvaro Herrera
Aleksander Alekseev wrote: > pg_receivexlog: could not send replication command "START_REPLICATION": > out of memory pg_receivexlog: disconnected; waiting 5 seconds to try > again pg_receivexlog: starting log streaming at 0/100 (timeline 1) > > Breakpoint 1, getCopyStart (conn=0x610180, copyt

Re: [HACKERS] Crash with old Windows on new CPU

2016-03-09 Thread Alvaro Herrera
Magnus Hagander wrote: > On Wed, Mar 9, 2016 at 4:36 PM, Christian Ullrich > wrote: > > And apparently not a single one with VS 2013. OK, I'll see what I can do > > about setting some up soonish, at least with (server) 2008 and (client) 7. > > FWIW, I have a local build of 9.5.1 with this patch i

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Alvaro Herrera
Tom Lane wrote: > Amit Kapila writes: > > Without setting max_parallel_degree, it works fine and generate the > > appropriate results. Here the issue seems to be that the code in > > grouping_planner doesn't apply the required PathTarget to Path below Gather > > Path due to which when we generat

Re: [HACKERS] pgcrypto: add s2k-count

2016-03-09 Thread Alvaro Herrera
Alvaro Herrera wrote: > Anyway, assuming that the iteration count was already being used > correctly, then as far as I'm concerned we're ready to go. The attached > patch is what I would commit. I read some more (gnupg code as well as our own) and applied some more

Re: [HACKERS] pgcrypto: add s2k-count

2016-03-09 Thread Alvaro Herrera
Jeff Janes wrote: > On Tue, Mar 8, 2016 at 4:09 PM, Alvaro Herrera > wrote: > Yeah, I find that pretty impenetrable too. I just treated it as a > black box, I changed how the number passed into it gets set, but not > the meaning of that number. Initially I had the user s

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-09 Thread Alvaro Herrera
Craig Ringer wrote: > 004 allows filtering on RecursiveCopy by a predicate function. Needed for > filesystem level backups (007). It could probably be squashed with 007 if > desired. I pushed this after some tinkering: * filtering applies to all directory entries, not just files. So you can fil

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-09 Thread Alvaro Herrera
Craig Ringer wrote: > 007 adds PostgresNode support for hot and cold filesystem-level backups > using pg_start_backup and pg_stop_backup, which will be required for some > coming tests and are useful by themselves. Finally, pushed this one after rebasing on top of the changes in the others. I th

Re: [HACKERS] utils/misc: Simplify search of end of argv in save_ps_display_args()

2016-03-10 Thread Alvaro Herrera
Alexander Kuleshov wrote: > Hello, > > Attached patch provides trivial simplification of the search of end of > the argv[] area by replacing for() loop with calculation based on > argc. Uhm. Doesn't this break the very same thing that the comment explains it's doing? -- Álvaro Herrera

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Alvaro Herrera
Robert Haas wrote: > That's probably marginally enough support to proceed with this, but > I'm somewhat unenthused about putting time into it myself. Alvaro, > any chance you want to handle this one? OK, I can take it, but I have a few other things earlier in my queue so it will be a few days.

Re: [HACKERS] Floating point timestamps

2016-03-10 Thread Alvaro Herrera
Stephen Frost wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: > > Thomas Munro writes: > > > Is the plan to remove support for floating point timestamps at some > > > stage? If so, what is that waiting on, and would it provide > > > sufficient warning if (say) 9.6 were documented as the last majo

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Alvaro Herrera
Simon Riggs wrote: > On 10 March 2016 at 06:53, Michael Paquier > wrote: > > > On Wed, Mar 9, 2016 at 12:13 AM, Alvaro Herrera > > wrote: > > > Robert Haas wrote: > > >> I'm pretty meh about the whole idea of this function, though, > > &g

Re: [HACKERS] create opclass documentation outdated

2016-03-10 Thread Alvaro Herrera
Emre Hasegeli wrote: > >> In create_opclass.sgml, not only do we have the list of AMs supporting > >> STORAGE, but there is also a paragraph describing which AMs do what > >> for input datatypes of FUNCTION members (around line 175). > > > > I placed BRIN together with gist/gin/spgist here, namely

Re: [HACKERS] create opclass documentation outdated

2016-03-10 Thread Alvaro Herrera
Alvaro Herrera wrote: > Hmm, but if we ever add support for other types in inclusion as you > describe, we will need STORAGE, no? I think it's unfortunate that the > code currently uses the field where it's not really necessary, but > harmless; if people break their system

Re: [HACKERS] Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-10 Thread Alvaro Herrera
Corey Huinker wrote: > New patch for Alvaro's consideration. Thanks. As I said, it will be a few days before I get to this; any further reviews in the meantime are welcome. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training &

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-03-11 Thread Alvaro Herrera
Craig Ringer wrote: > Hi all > > I think I found a couple of logical decoding issues while writing tests for > failover slots. > > Despite the docs' claim that a logical slot will replay data "exactly > once", a slot's confirmed_lsn can go backwards and the SQL functions can > replay the same dat

Re: [HACKERS] [patch] Proposal for \crosstabview in psql

2016-03-14 Thread Alvaro Herrera
Jim Nasby wrote: > On 3/13/16 12:48 AM, Pavel Stehule wrote: > >crosstabview is really visualization tool. **But now, there are not any > >other tool available from terminal.** So this can be significant help to > >all people who would to use this functionality. > > Not just the terminal either. O

[HACKERS] Re: [COMMITTERS] pgsql: Refactor to create generic WAL page read callback

2016-03-14 Thread Alvaro Herrera
Simon Riggs wrote: > Refactor to create generic WAL page read callback > > Previously we didn’t have a generic WAL page read callback function, > surprisingly. Logical decoding has logical_read_local_xlog_page(), which was > actually generic, so move that to xlogfunc.c and rename to > read_local_x

Re: [HACKERS] Timeline following for logical slots

2016-03-14 Thread Alvaro Herrera
Petr Jelinek wrote: > On 04/03/16 17:08, Craig Ringer wrote: > >I'd really appreciate some review of the logic there by people who know > >timelines well and preferably know the xlogreader. It's really just one > >function and 2/3 comments; the code is simple but the reasoning leading > >to it is n

Re: [HACKERS] Timeline following for logical slots

2016-03-15 Thread Alvaro Herrera
Andres Freund wrote: > Could you perhaps wait till tomorrow? I'd like to do a pass over it. Sure thing. I'll wait for your review. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mai

Re: [HACKERS] Timeline following for logical slots

2016-03-15 Thread Alvaro Herrera
Craig already replied to most points. I think we can sum up as "we've done the best we can with what we have, maybe somebody can figure how to do better in the future but for now this works." Andres Freund wrote: > On 2016-03-14 20:10:58 -0300, Alvaro Herrera wrote: >

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-03-15 Thread Alvaro Herrera
David Steele wrote: > This patch no longer applies cleanly: > > $ git apply ../other/group_update_clog_v6.patch Normally "git apply -3" gives good results in these cases -- it applies the 3-way merge algorithm just as if you had applied the patch to the revision it was built on and later git-mer

Re: [HACKERS] Minor bug affecting ON CONFLICT lock wait log messages

2016-03-15 Thread Alvaro Herrera
Stephen Frost wrote: > * Julien Rouhaud (julien.rouh...@dalibo.com) wrote: > XLTW_InsertIndexUnique is used when building a unique index, but this is > just a check, and more to the point, it's actually a re-check of what > we're doing in nbinsert.c where we're already using XLTW_InsertIndex. > >

Re: [HACKERS] Small patch: fix warnings during compilation on FreeBSD

2016-03-15 Thread Alvaro Herrera
Aleksander Alekseev wrote: > Please note that these changes: > > ``` > -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) > +#define LARGE_OFF_T off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << > 31) << 31)) > ``` > > ... were generated but `autoreconf -iv`. I was not sure what to d

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2016-03-15 Thread Alvaro Herrera
Robert Haas wrote: > On Tue, Mar 15, 2016 at 10:41 AM, Thom Brown wrote: > >> It turns out that I hate the fact that the Wait Event Name column is > >> effectively in a random order. If a user sees a message, and goes to > >> look up the value in the wait_event description table, they either > >>

Re: [HACKERS] pgbench stats per script & other stuff

2016-03-15 Thread Alvaro Herrera
Fabien COELHO wrote: > >If somebody specifies thousands of -f switches, they will waste a few > >bytes with each, but I'm hardly concerned about a few dozen kilobytes > >there ... > > Ok, so you prefer a memory leak. I hate it on principle. I don't "prefer" memory leaks -- I prefer interfaces th

Re: [HACKERS] pg_dump / copy bugs with "big lines" ?

2016-03-18 Thread Alvaro Herrera
Daniel Verite wrote: > To go past that problem, I've tried tweaking the StringInfoData > used for COPY FROM, like the original patch does in CopyOneRowTo. > > It turns out that it fails a bit later when trying to make a tuple > from the big line, in heap_form_tuple(): > > tuple = (HeapTuple)

Re: [HACKERS] Make primnodes.h gender neutral

2016-03-19 Thread Alvaro Herrera
Joshua D. Drake wrote: > On 03/17/2016 01:36 PM, Alvaro Herrera wrote: > >Robert Haas wrote: > >>On Thu, Mar 17, 2016 at 3:31 PM, Joshua D. Drake > >>wrote: > >>>Per the twitter verse, here is an updated version of primnodes.h > >> > >>+

Re: [HACKERS] Relaxing SSL key permission checks

2016-03-19 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 3/10/16 9:20 PM, Peter Eisentraut wrote: > > On 3/4/16 3:55 PM, Alvaro Herrera wrote: > >> * it failed to check for S_IXUSR, so permissions 0700 were okay, in > >> contradiction with what the error message indicates. This is a > >&

Re: [HACKERS] [patch] Proposal for \crosstabview in psql

2016-03-19 Thread Alvaro Herrera
Pavel Stehule wrote: > Can I do review? Of course. -- Álvaro Herrerahttp://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: h

Re: [HACKERS] Parallel Aggregate

2016-03-19 Thread Alvaro Herrera
I read this a bit, as an exercise to try to follow parallel query a bit. I think the most interesting thing I have to say is that the new error messages in ExecInitExpr do not conform to our style. Probably just downcase everything except Aggref and you're done, since they're can't-happen conditio

Re: [HACKERS] pgbench stats per script & other stuff

2016-03-19 Thread Alvaro Herrera
I pushed your 25, with some additional minor tweaks. I hope I didn't break anything; please test. Fabien COELHO wrote: > >I don't "prefer" memory leaks -- I prefer interfaces that make sense. > > C is not designed to return two things, and if it is what is needed it looks > awkward whatever is

Re: [HACKERS] Make primnodes.h gender neutral

2016-03-19 Thread Alvaro Herrera
Robert Haas wrote: > On Thu, Mar 17, 2016 at 3:31 PM, Joshua D. Drake > wrote: > > Per the twitter verse, here is an updated version of primnodes.h > > +1. +1 what? Are you saying this patch is good? I don't think it is: the previous sentence is written in third person, and the following ones

Re: [HACKERS] WIP: Access method extendability

2016-03-19 Thread Alvaro Herrera
Teodor Sigaev wrote: > > >>I don't see any objection, is consensus reached? I'm close to comiit > >>that... > >> > > > >I did only cursory review on the bloom contrib module and don't really have > >complaints there, but I know you can review that one. I'd like the English of > >the generic_xlog.c

Re: [HACKERS] pgbench stats per script & other stuff

2016-03-19 Thread Alvaro Herrera
Jeff Janes wrote: > On Sat, Mar 19, 2016 at 8:41 AM, Alvaro Herrera > wrote: > > I pushed your 25, with some additional minor tweaks. I hope I didn't > > break anything; please test. > > I'm now getting compiler warnings: > > gcc versio

Re: [HACKERS] incorrect docs for pgbench / skipped transactions

2016-03-19 Thread Alvaro Herrera
Fabien COELHO wrote: > > I've created an entry in the next commit fest so that it is not lost, but I > hope it will be committed before then. If this problem was introduced by commits in 9.6, this issue should be listed in the open items page, https://wiki.postgresql.org/wiki/Open_Items -- Álva

Re: [HACKERS] incorrect docs for pgbench / skipped transactions

2016-03-19 Thread Alvaro Herrera
Fabien COELHO wrote: > > >>I've created an entry in the next commit fest so that it is not lost, but I > >>hope it will be committed before then. > > > >If this problem was introduced by commits in 9.6, this issue should be > >listed in the open items page, > >https://wiki.postgresql.org/wiki/Open

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-19 Thread Alvaro Herrera
Abhijit Menon-Sen wrote: > At 2016-01-18 11:08:19 +0530, a...@2ndquadrant.com wrote: > > > > I'm proposing to address a part of that problem by allowing extension > > dependencies to be explicitly declared for functions and objects > > created either by a user or dynamically by the extension itself

Re: [HACKERS] Sequence Access Method WIP

2016-03-19 Thread Alvaro Herrera
Petr Jelinek wrote: > And finally the 0003-gapless-seq is example contrib module that implements > dependably and transitionally safe gapless sequence access method. It's > obviously slow as it has to do locking and basically serialize all the > changes to sequence so only one transaction may use

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Alvaro Herrera
Andres Freund wrote: > From 1d444b0855dbf65d66d73beb647b772fff3404c8 Mon Sep 17 00:00:00 2001 > From: Andres Freund > Date: Fri, 18 Mar 2016 00:52:07 -0700 > Subject: [PATCH 4/5] Combine win32 and unix latch implementations. > > Previously latches for windows and unix had been implemented in > d

Re: [HACKERS] Parallel Aggregate

2016-03-20 Thread Alvaro Herrera
David Rowley wrote: > I've rewritten the comment to become: > > /* > * Providing that the estimated size of the hashtable does not exceed > * work_mem, we'll generate a HashAgg Path, although if we were unable > * to sort above, then we'd better generate a Path, so that we at least > * have one.

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-20 Thread Alvaro Herrera
Haribabu Kommi wrote: > > Check. > > > > +} lookup_hba_line_context; > > ^ but why TAB here? > > corrected. I am not sure why pg_indent is adding a tab here. It's because lookup_hba_line_context is not listed in typedefs.list. I suggest adding it and all other new typedefs you add, and rerun

Re: [HACKERS] multivariate statistics v14

2016-03-20 Thread Alvaro Herrera
Another skim on 0002: reference.sgml is missing a call to &alterStatistic. ObjectProperty[] contains a comment that the ACL is "same as relation", but is that still correct, given that now stats may be related to more than one relation? Do we even know what the rules for ACLs on cross-relation s

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Alvaro Herrera
Abhijit Menon-Sen wrote: > + else if (strcmp(defel->defname, "extdepend") == 0) > + { > + if (*extdepend_item) > + goto duplicate_error; > + > + *extdepend_item = defel; > + } > else > return false; > I'm not sure I agr

Re: [HACKERS] [patch] Proposal for \crosstabview in psql

2016-03-21 Thread Alvaro Herrera
Robert Haas wrote: > On Sun, Mar 20, 2016 at 5:27 PM, Pavel Stehule > wrote: > > From my perspective, it is ready for commiter. Daniel solved the most big > > issues. > > OK, so that brings us back to: is there any committer who likes this > enough to want to look at committing it? My view hasn

Re: [HACKERS] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Alvaro Herrera
David G. Johnston wrote: > Tom doesn't care enough to veto and you don't really care... > > I'll admit it's awkward because it's abbreviated but if someone enters > \watch 5 and then sees (5s) in the title I think they can put two and two > together. > > If the watched query takes a long to run,

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-21 Thread Alvaro Herrera
Tom Lane wrote: > "David G. Johnston" writes: > > On Monday, March 21, 2016, Tom Lane wrote: > >> What about just discarding the old format entirely, and printing one of > >> these two things: > >> > >> Timestamp (every Ns) > >> > >> User Given Title Timestamp (every Ns) > > > This works for

  1   2   3   4   5   6   7   8   9   10   >