Re: [HACKERS] Make primnodes.h gender neutral

2016-03-19 Thread David G. Johnston
On Thursday, March 17, 2016, Robert Haas wrote: > On Thu, Mar 17, 2016 at 6:34 PM, Chapman Flack > wrote: > > For those of us who are outside of the twitterverse sort of on purpose, > > are there a few representative links you could post? Maybe this is such > > fresh breaking news Google hasn't

Re: [HACKERS] Parallel Aggregate

2016-03-19 Thread Haribabu Kommi
On Thu, Mar 17, 2016 at 2:13 PM, James Sewell wrote: > > Hi again, > > This is probably me missing something, but is there a reason parallel > aggregate doesn't seem to ever create append nodes containing Index scans? > > SET random_page_cost TO 0.2; > SET max_parallel_degree TO 8; > > postgres=#

Re: [HACKERS] fd.c: flush data problems on osx

2016-03-19 Thread Stas Kelvich
> On 17 Mar 2016, at 20:23, Andres Freund wrote: > >> >> Also there are no default ifdef inside this function, is there any >> check that will guarantee that pg_flush_data will not end up with >> empty body on some platform? > > There doesn't need to be - it's purely "advisory", i.e. just an >

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] incorrect docs for pgbench / skipped transactions

2016-03-19 Thread Fabien COELHO
Thanks for the pointer. However, I do not have "editor priviledge" on this wiki, maybe Tomas has? I gave you editor privs now, but since it's in 9.5 I guess it needs to be on the bug tracker (Except, of course, we don't have one.) Ok, I added a reference to the commitfest entry from this wi

Re: [HACKERS] Proposal: BSD Authentication support

2016-03-19 Thread Thomas Munro
On Fri, Mar 18, 2016 at 2:58 AM, Marisa Emerson wrote: > >>Our usual wording is "the PostgreSQL user account". Perhaps we should >>be more explicit about the fact that membership of this Unix group is >>needed on *OpenBSD*, since other current or future BSD forks could >>vary. I see that the speci

[HACKERS] Small patch: fix comments in contrib/pg_trgm/

2016-03-19 Thread Aleksander Alekseev
Typos for the most part. -- Best regards, Aleksander Alekseev http://eax.me/ diff --git a/contrib/pg_trgm/trgm_gin.c b/contrib/pg_trgm/trgm_gin.c index ea8edef..2e41a9f 100644 --- a/contrib/pg_trgm/trgm_gin.c +++ b/contrib/pg_trgm/trgm_gin.c @@ -204,7 +204,7 @@ gin_trgm_consistent(PG_FUNCTION_ARG

Re: [HACKERS] proposal: make NOTIFY list de-duplication optional

2016-03-19 Thread David Steele
On 3/11/16 1:46 PM, David Steele wrote: Hi Filip, On 2/20/16 8:00 AM, Filip Rembiałkowski wrote: On Fri, Feb 19, 2016 at 10:09 PM, Catalin Iacob mailto:t...@sss.pgh.pa.us>> wrote: > FWIW, I think it would be a good thing if the NOTIFY statement syntax were > not remarkably diffe

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-19 Thread Robert Haas
On Thu, Feb 18, 2016 at 6:54 AM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > It is the SQL part of old psqlscan.l but the difference between > them is a bit bothersome to see. I attached the diff between them > as "psqlscanbody.l.diff" for convenience. > This is a huge diff, and

Re: [HACKERS] fd.c doesn't remove files on a crash-restart

2016-03-19 Thread Peter Geoghegan
On Wed, Mar 16, 2016 at 10:53 AM, Joshua D. Drake wrote: > fd.c[1] will remove files from pgsql_tmp on a restart but not a > crash-restart per this comment: > > /* > * NOTE: we could, but don't, call this during a post-backend-crash restart > * cycle. The argument for not doing it is that someon

Re: [HACKERS] [COMMITTERS] pgsql: Improve memory management for external sorts.

2016-03-19 Thread Peter Geoghegan
On Fri, Mar 18, 2016 at 11:43 AM, Andres Freund wrote: > Yes, that removes the warning, and looks correct. Thanks. We should be careful to not repeat this mistake when the quicksort patch goes in. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To ma

Re: [HACKERS] Refactoring speculative insertion with unique indexes a little

2016-03-19 Thread Robert Haas
On Mon, Mar 14, 2016 at 8:17 PM, Peter Geoghegan wrote: > On Mon, Mar 14, 2016 at 5:04 PM, Robert Haas wrote: >> There hasn't been a new version of this patch in 9 months, you're >> clearly not in a hurry to produce one, and nobody else seems to feel >> strongly that this is something that needs

Re: [HACKERS] Parallel Aggregate

2016-03-19 Thread David Rowley
On 17 March 2016 at 00:57, Robert Haas wrote: > On Wed, Mar 16, 2016 at 6:49 AM, David Rowley > wrote: >> On 16 March 2016 at 15:04, Robert Haas wrote: >>> I don't think I'd be objecting if you made PartialAggref a real >>> alternative to Aggref. But that's not what you've got here. A >>> Part

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

2016-03-19 Thread Fabien COELHO
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 Thanks for the pointer. However

Re: [HACKERS] raw output from copy

2016-03-19 Thread Pavel Stehule
2016-03-18 16:32 GMT+01:00 David Steele : > On 3/12/16 1:24 AM, Pavel Stehule wrote: > > Great, thank you very much. I hope so this feature really useful. It >> allow to simple export/import XML doc in different encodings, JSONs and >> can be enhanced future via options. The nice feature (but not

[HACKERS] fd.c doesn't remove files on a crash-restart

2016-03-19 Thread Joshua D. Drake
Hello, fd.c[1] will remove files from pgsql_tmp on a restart but not a crash-restart per this comment: /* * NOTE: we could, but don't, call this during a post-backend-crash restart * cycle. The argument for not doing it is that someone might want to examine * the temp files for debugging pu

Re: [HACKERS] checkpointer continuous flushing

2016-03-19 Thread Fabien COELHO
Hello Tomas, Thanks for these great measures. * 4 x CPU E5-4620 (2.2GHz) 4*8 = 32 cores / 64 threads. * 256GB of RAM Wow! * 24x SSD on LSI 2208 controller (with 1GB BBWC) Wow! RAID configuration ? The patch is designed to fix very big issues on HDD, but it is good to see that the im

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

2016-03-19 Thread Jeff Janes
On Sat, Mar 19, 2016 at 11:34 AM, Alvaro Herrera wrote: > 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

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

2016-03-19 Thread Shulgin, Oleksandr
On Fri, Mar 18, 2016 at 7:53 AM, Haribabu Kommi wrote: > > On Thu, Mar 17, 2016 at 6:56 PM, Shulgin, Oleksandr > wrote: > > > > You mean change context name and correct the comment? I didn't suggest to > > change the function name. > > Changed the context name and the comment only. Check. +} l

Re: [HACKERS] insufficient qualification of some objects in dump files

2016-03-19 Thread Tom Lane
Peter Eisentraut writes: > On 2/26/16 1:30 AM, Tom Lane wrote: >> As the patch is presented, I agree with Peter that it does not really >> need a format number bump. The question that has to be answered is >> whether this solution is good enough? You could not trust it for >> automated processin

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] 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 version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) > > > pgbench.c

Re: [HACKERS] Idle In Transaction Session Timeout, revived

2016-03-19 Thread Vik Fearing
On 03/16/2016 05:32 PM, Robert Haas wrote: > Committed with slight changes to the docs, and I added a flag variable > instead of relying on IdleInTransactionSessionTimeout not changing at > an inopportune time. Thank you! -- Vik Fearing +33 6 46 75 15 36

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

2016-03-19 Thread Robert Haas
On Thu, Mar 17, 2016 at 12:59 PM, Tom Lane wrote: > One idea that might be worth considering is to define the function > as generate_series(date,date,interval) returns timestamp (without > time zone). The point here would be only to move the behavior for > date inputs as far as getting timestamp

Re: [HACKERS] Show dropped users' backends in pg_stat_activity

2016-03-19 Thread Robert Haas
On Tue, Mar 15, 2016 at 5:21 PM, Oskari Saarenmaa wrote: > I was looking into some issues we recently had when dropping db users and > was surprised to see that dropped users' sessions and transactions continue > to work after the role is dropped. > > Since dropping a role requires dropping all gr

Re: [HACKERS] Combining Aggregates

2016-03-19 Thread Tomas Vondra
Hi, On 03/17/2016 12:53 PM, David Rowley wrote: > ... > I just had a quick skim over the patch and noticed the naming convention you're using for the combine function is *_pl, and you have float8_pl. There's already a function named float8pl() which is quite close to what you have. I've been sti

Re: [HACKERS] Choosing parallel_degree

2016-03-19 Thread Julien Rouhaud
On 16/03/2016 17:55, Robert Haas wrote: > On Wed, Mar 16, 2016 at 12:47 PM, Julien Rouhaud > wrote: >> Something like a "min_parallel_degree" then ? > > Why not just parallel_degree without any prefix? As in, when scanning > this table in parallel, the reloption suggests using N workers. > Agr

Re: [HACKERS] [COMMITTERS] pgsql: Improve memory management for external sorts.

2016-03-19 Thread Peter Geoghegan
On Sat, Mar 19, 2016 at 6:38 AM, Robert Haas wrote: > It would be helpful if you could either (a) confirm that that patch > still applies and that it has no issues of this type or (b) post an > updated version. I don't think that it has a problem with lacking the right int64 format specifiers. Ho

Re: [HACKERS] Minor typos in optimizer/README

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 5:41 PM, Jim Nasby wrote: > Studying the partification commit, I noticed a few typos in $SUBJECT. Patch > attached. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hack

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

2016-03-19 Thread Craig Ringer
On 10 March 2016 at 09:53, Craig Ringer wrote: > > Thanks for pushing. > I found a minor issue with the new psql method while writing tests for failover slots. Patch attached. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Serv

Re: [HACKERS] typmod is always -1

2016-03-19 Thread Tom Lane
Chapman Flack writes: > It seems that a typmod can only be used restrict the set of possible > values of the unmodified type (as clearly seen in the language "length > conversion cast", since certainly a typmod allowing { string | length < N } > is doing nothing but enforcing a subset of { string

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-03-19 Thread Tom Lane
Jim Nasby writes: > On 3/3/16 4:51 AM, Pavel Stehule wrote: >> CREATE TABLE a(a int); >> CREATE TABLE b(a a.a%TYPE) >> >> And the people expecting the living relation between table a and table >> b. So when I do ALTER a.a, then b.a should be changed. What if I drop >> a.a or drop a? >> >> So thi

Re: [HACKERS] Parallel Aggregate

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 5:05 PM, David Rowley wrote: >> Cool! Why not initialize aggpartialtype always? > > Because the follow-on patch sets that to either the serialtype or the > aggtranstype, depending on if serialisation is required. Serialisation > is required for parallel aggregate, but if w

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

2016-03-19 Thread David Steele
On 3/17/16 4:49 AM, Dean Rasheed wrote: > On 16 March 2016 at 23:32, David Steele wrote: > >> >> I think in this case it comes down to a committer's judgement so I have >> marked this "ready for committer" and passed the buck on to Álvaro. > > So I was pretty much "meh" on this patch too, becaus

Re: [HACKERS] Make primnodes.h gender neutral

2016-03-19 Thread Chapman Flack
On 03/17/16 19:09, Robert Haas wrote: > On Thu, Mar 17, 2016 at 6:34 PM, Chapman Flack wrote: > Not to pick on you in particular... > Debating whether or not somebody is currently upset about this, and > how upset the are, and what the value is of fixing it is missing the > point. Well, looking

Re: Pushdown target list below gather node (WAS Re: [HACKERS] WIP: Upper planner pathification)

2016-03-19 Thread Tom Lane
Robert Haas writes: > OK, I've committed something along those lines. Thanks for the > advice, and feel free to whack it around if you have an idea for > improving it further - though IMHO this is good enough for 9.6. The committed patch looks fine to me. WRT your commit-message comment about p

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2016-03-19 Thread Tomas Vondra
On 03/18/2016 08:53 PM, Robert Haas wrote: On Fri, Mar 18, 2016 at 3:29 PM, Tom Lane wrote: Robert Haas writes: On Wed, Apr 29, 2015 at 12:33 PM, Tomas Vondra wrote: On 04/29/15 18:26, Tom Lane wrote: But there are basic reasons why expression_tree_walker should not try to deal with Restri

Re: [HACKERS] [PATCH] Integer overflow in timestamp[tz]_part() and date/time boundaries check

2016-03-19 Thread Vitaly Burovoy
On 2016-03-15, Mark Dilger wrote: > >> On Mar 14, 2016, at 5:12 PM, Vitaly Burovoy >> wrote: >> >> On 3/14/16, Mark Dilger wrote: >>> The first thing I notice about this patch is that >>> src/include/datatype/timestamp.h >>> has some #defines that are brittle. The #defines have comments >>> exp

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] silent data loss with ext4 / all current versions

2016-03-19 Thread Michael Paquier
On Wed, Mar 16, 2016 at 2:46 AM, Andres Freund wrote: > On 2016-03-15 15:39:50 +0100, Michael Paquier wrote: >> Yeah, true. We definitely need to do something for that, even for HEAD >> it seems like an overkill to have something in for example src/common >> to allow frontends to have something if

[HACKERS] Postgres_fdw join pushdown - getting server crash in left outer join of three table

2016-03-19 Thread Rajkumar Raghuwanshi
Hi, I am testing postgres_fdw join pushdown feature for PostgreSQL 9.6 DB, and I observed below issue. *Observation:* If do a left outer join on foreign tables more than two times. It is causing the server crash. Added below statement in contrib/postgres_fdw/postgres_fdw.sql and ran make check,

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-19 Thread Tom Lane
Robert Haas writes: > Well, I'm trying to find a piece of this patch that is small enough > that I can understand it and in good enough shape that I can commit it > independently, but I am having some difficulty with that. I keep > hoping some other committer is going to come along and be able to

Re: [HACKERS] Choosing parallel_degree

2016-03-19 Thread Julien Rouhaud
On 17/03/2016 11:23, Julien Rouhaud wrote: > On 17/03/2016 02:07, James Sewell wrote: >> >> On Thu, Mar 17, 2016 at 5:05 AM, Julien Rouhaud >> mailto:julien.rouh...@dalibo.com>> wrote: >> >> >> attached v3 drops the GUC part. >> >> >> This looks good good. I do think that some threshold control

Re: [HACKERS] WIP: Upper planner pathification

2016-03-19 Thread Robert Haas
On Mon, Mar 14, 2016 at 9:21 PM, Kouhei Kaigai wrote: > So, even though we don't need to define multiple hook declarations, > I think the hook invocation is needed just after create__paths() > for each. It will need to inform extension the context of hook > invocation, the argument list will t

Re: [HACKERS] [BUGS] pgbench -C -M prepared gives an error

2016-03-19 Thread Michael Paquier
On Thu, Mar 17, 2016 at 2:14 PM, Tom Lane wrote: > It's certainly a bug that the combination of the switches doesn't work, > and I already fixed it (47211af17a). My question was more towards > whether -C is a useful benchmarking option at all. I cannot imagine > a situation in which, if someone

Re: [HACKERS] fd.c doesn't remove files on a crash-restart

2016-03-19 Thread Andres Freund
On 2016-03-16 11:06:23 -0700, Joshua D. Drake wrote: > On 03/16/2016 11:04 AM, Andres Freund wrote: > >On 2016-03-16 11:02:09 -0700, Joshua D. Drake wrote: > 3. The problem can get worse over time. If you have a very long running > instance, any time the backend crash-restarts you have to p

[HACKERS] pg_filedump 9.5.0

2016-03-19 Thread Christoph Berg
Re: To Pavel Raiskup 2016-03-19 <20160319170614.gb8...@msg.df7cb.de> > thanks for the patches, I've pushed them to the git repo. > > http://git.postgresql.org/gitweb/?p=pg_filedump.git We don't have any place to put releases, so I'm posting the tar ball here... Christoph pg_filedump-9.5.0.tar.

Re: [HACKERS] pg_filedump patch for 9.5

2016-03-19 Thread Christoph Berg
Re: Pavel Raiskup 2016-02-26 <8883822.6jzmttx...@nb.usersys.redhat.com> > On Saturday 08 of August 2015 20:38:38 Satoshi Nagayasu wrote: > > I have created a patch for pg_filedump to work with 9.5. > > Here is a list of changes. > > > > * Fix to rename CRC32 macros to work with 9.5. > > * Fix to

Re: [HACKERS] Choosing parallel_degree

2016-03-19 Thread Julien Rouhaud
On 17/03/2016 02:07, James Sewell wrote: > > On Thu, Mar 17, 2016 at 5:05 AM, Julien Rouhaud > mailto:julien.rouh...@dalibo.com>> wrote: > > > attached v3 drops the GUC part. > > > This looks good good. I do think that some threshold control would be > good in the long term - but you are r

Re: [HACKERS] Combining Aggregates

2016-03-19 Thread Haribabu Kommi
On Wed, Mar 16, 2016 at 10:08 PM, David Rowley wrote: > On 16 March 2016 at 23:54, Haribabu Kommi wrote: >> On Wed, Mar 16, 2016 at 8:34 AM, David Rowley >> wrote: >>> Yes me too, so I spent several hours yesterday writing all of the >>> combine functions and serialisation/deserialisation that a

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

2016-03-19 Thread Andres Freund
On 2016-03-18 11:01:04 -0400, Robert Haas wrote: > On Thu, Mar 17, 2016 at 9:22 PM, Michael Paquier > wrote: > > FWIW, my instinctive thought on the matter is to report the event > > directly in WaitLatch() via a name of the event caller provided > > directly in it. The category of the event is th

Re: [HACKERS] [BUGS] pgbench -C -M prepared gives an error

2016-03-19 Thread Tatsuo Ishii
> We're not resetting the prepared[] array when we pull the plug on an > existing connection. > > Is a connection per transaction really a sane case to consider? Yes, I would think. This case reveals the connection overhead. We already are able to handle the simple query cases. Why not for extend

Re: [HACKERS] extend pgbench expressions with functions

2016-03-19 Thread Fabien COELHO
Here is a v36 which inspect very carefully the string to decide whether it is an int or a double. You may, or may not, find it to your taste, I can't say. Here is a v37 which is mostly a rebase after recent changes. Also I noticed that I was double counting errors in the previous version, so

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

2016-03-19 Thread Fabien COELHO
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. -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] checkpointer continuous flushing

2016-03-19 Thread Tomas Vondra
Hi, On 03/17/2016 10:14 PM, Fabien COELHO wrote: ... I would have suggested using the --latency-limit option to filter out very slow queries, otherwise if the system is stuck it may catch up later, but then this is not representative of "sustainable" performance. When pgbench is running unde

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-19 Thread Kyotaro HORIGUCHI
Thank you for the comment, but could you please tell me what kind of criteria should I take to split this patch? The discussion about splitting criteria is in the following reply (in the sentence begins with "By the way"). At Wed, 16 Mar 2016 11:57:25 -0400, Robert Haas wrote in > On Thu, Feb 1

Re: [HACKERS] Odd system-column handling in postgres_fdw join pushdown patch

2016-03-19 Thread Ashutosh Bapat
On Thu, Mar 17, 2016 at 4:30 PM, Etsuro Fujita wrote: > Hi, > > I noticed that the postgres_fdw join pushdown patch retrieves system > columns other than ctid (and oid) from the remote server as shown in the > example: > > postgres=# explain verbose select foo.tableoid, foo.xmin, foo.cmin, > foo.

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: Covering + unique indexes.

2016-03-19 Thread David Steele
On 3/14/16 9:57 AM, Anastasia Lubennikova wrote: > New version of the patch implements pg_dump well. > Documentation related to constraints is updated. > > I hope, that patch is in a good shape now. It looks like this patch should be marked "needs review" and I have done so. -- -David da...@pg

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-03-19 Thread Pavel Stehule
2016-03-16 20:53 GMT+01:00 Jim Nasby : > On 3/3/16 4:51 AM, Pavel Stehule wrote: > >> CREATE TABLE a(a int); >> CREATE TABLE b(a a.a%TYPE) >> >> And the people expecting the living relation between table a and table >> b. So when I do ALTER a.a, then b.a should be changed. What if I drop >> a.a or

Re: [HACKERS] oldest xmin is far in the past

2016-03-19 Thread Tomas Vondra
Hi, On 03/19/2016 06:29 AM, John Snow wrote: There is no any long transaction neither prepared transaction. Can you show us pg_stat_activity? Particularly the xmin values for backends attached to the two databases mentioned in the log (1 and 12451). FWIW the second OID is a bit weird - the

Re: [HACKERS] insufficient qualification of some objects in dump files

2016-03-19 Thread Robert Haas
On Fri, Mar 18, 2016 at 2:13 AM, Michael Paquier wrote: > On Fri, Mar 18, 2016 at 5:38 AM, Tom Lane wrote: >> Given the lack of any other complaints about this, I'm okay with the >> approach as presented. (I haven't read the patch in detail, though.) > > FWIW, I am still of the opinion that the

Re: Pushdown target list below gather node (WAS Re: [HACKERS] WIP: Upper planner pathification)

2016-03-19 Thread Robert Haas
On Fri, Mar 18, 2016 at 10:08 AM, Tom Lane wrote: > Robert Haas writes: >> OK, I've committed something along those lines. Thanks for the >> advice, and feel free to whack it around if you have an idea for >> improving it further - though IMHO this is good enough for 9.6. > > The committed patch

Re: Pushdown target list below gather node (WAS Re: [HACKERS] WIP: Upper planner pathification)

2016-03-19 Thread Tom Lane
Amit Kapila writes: > While reading above code changes, it looks like it is assuming that subpath > and subplan will always be same (as it is verifying projection capability > of subpath and attaching the tlist to subplan), but I think it is possible > that subpath and subplan correspond to differ

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

2016-03-19 Thread Fabien COELHO
Hello Álvaro, I pushed your 25, with some additional minor tweaks. I hope I didn't break anything; please test. I've made a few tests and all looks well. I guess the build farm will say if it does not like it. Thanks, -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postg

Re: [HACKERS] Weighted Stats

2016-03-19 Thread Tomas Vondra
Hi, On 03/19/2016 07:34 AM, David Fetter wrote: On Fri, Mar 18, 2016 at 06:12:12PM -0700, Jeff Janes wrote: On Tue, Mar 15, 2016 at 8:36 AM, David Fetter wrote: Please find attached a patch that uses the float8 version to cover the numeric types. Is there a well-defined meaning for having

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] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-19 Thread Shulgin, Oleksandr
On Thu, Mar 17, 2016 at 2:12 AM, Haribabu Kommi wrote: > On Wed, Mar 16, 2016 at 9:49 PM, Shulgin, Oleksandr > wrote: > > > > Some comments: > > > > +/* Context to use with hba_line_callback function. */ > > +typedef struct > > +{ > > + MemoryContext memcxt; > > + TupleDesc tupdesc; > > +

Re: [HACKERS] POC: Cache data in GetSnapshotData()

2016-03-19 Thread Amit Kapila
On Wed, Mar 16, 2016 at 10:59 PM, Robert Haas wrote: > On Wed, Mar 16, 2016 at 4:40 AM, Mithun Cy > wrote: > >> >> On Thu, Mar 3, 2016 at 6:20 AM, Mithun Cy >> wrote: >> > I will continue to benchmark above tests with much wider range of >> clients. >> >> Latest Benchmarking shows following res

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] Parallel Aggregate

2016-03-19 Thread David Rowley
On 17 March 2016 at 03:47, Robert Haas wrote: > More review comments: > > /* > +* Likewise for any partial paths, although this case > is more simple as > +* we don't track the cheapest path. > +*/ > > I think in the process of gettin

Re: [HACKERS] WIP: Upper planner pathification

2016-03-19 Thread Robert Haas
On Thu, Mar 17, 2016 at 4:22 PM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Mar 17, 2016 at 2:31 PM, Tom Lane wrote: >>> Also, I don't particularly see a need for a corresponding API for FDWs. >>> If an FDW is going to do anything in this space, it presumably has to >>> build up ForeignPat

Re: [HACKERS] POC: Cache data in GetSnapshotData()

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 4:40 AM, Mithun Cy wrote: > > On Thu, Mar 3, 2016 at 6:20 AM, Mithun Cy > wrote: > > I will continue to benchmark above tests with much wider range of > clients. > > Latest Benchmarking shows following results for unlogged tables. > > clients BASE ONLY CLOG CHANGES % Incr

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] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread David G. Johnston
On Thu, Mar 17, 2016 at 7:57 AM, Corey Huinker wrote: > On Thu, Mar 17, 2016 at 10:00 AM, David Steele > wrote: > >> On 3/17/16 4:49 AM, Dean Rasheed wrote: >> >> > On 16 March 2016 at 23:32, David Steele wrote: >> > >> >> >> >> I think in this case it comes down to a committer's judgement so I

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

2016-03-19 Thread Tomas Vondra
Hi, On 03/19/2016 08:29 AM, Fabien COELHO wrote: ... Here is an updated version of your proposal: - use instead of " - use script_no and mention -b as well - spell out skipped explanation after the sample output Seems fine to me. Also, while reading the doc, I really think that the

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

2016-03-19 Thread Pavel Stehule
2016-03-19 15:45 GMT+01:00 Robert Haas : > On Mon, Mar 14, 2016 at 2:55 PM, Robert Haas > wrote: > > On Sat, Mar 12, 2016 at 10:34 AM, Daniel Verite > wrote: > >>> But worse than either of those things, there is no real > >>> agreement on what the overall design of this feature > >>> should be.

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

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 10:03 PM, Michael Paquier wrote: > On Wed, Mar 16, 2016 at 5:28 AM, Robert Haas wrote: >> On Tue, Mar 15, 2016 at 9:17 AM, Thomas Reiss >> wrote: >>> Here's a small docpatch to fix two typos in the new documentation. >> >> Thanks, committed. > > I just had a quick look a

Re: [HACKERS] psql metaqueries with \gexec

2016-03-19 Thread Robert Haas
On Mon, Mar 14, 2016 at 7:54 AM, Corey Huinker wrote: > Patch attached. Changes are thus: > - proper assignment of success var > - added documentation to psql manpage/html with examples pulled from > regression tests. > > Not changed are: > - exuberant braces, can remove if someone wants me to >

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

2016-03-19 Thread Robert Haas
On Mon, Mar 14, 2016 at 2:55 PM, Robert Haas wrote: > On Sat, Mar 12, 2016 at 10:34 AM, Daniel Verite > wrote: >>> But worse than either of those things, there is no real >>> agreement on what the overall design of this feature >>> should be. >> >> The part in the design that raised concerns up

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

2016-03-19 Thread Robert Haas
On Thu, Mar 10, 2016 at 1:40 AM, David G. Johnston wrote: > Adding -hackers for consideration in the Commitfest. I don't much like how this patch uses the arbitrary constant 50 in no fewer than 5 locations. Also, it seems like we could arrange for head_title to be "" rather than NULL when myopt.

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

2016-03-19 Thread Michael Paquier
On Wed, Mar 16, 2016 at 5:28 AM, Robert Haas wrote: > On Tue, Mar 15, 2016 at 9:17 AM, Thomas Reiss wrote: >> Here's a small docpatch to fix two typos in the new documentation. > > Thanks, committed. I just had a quick look at the wait_event committed, and I got a little bit disappointed that we

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Andres Freund
On 2016-03-18 20:14:07 +0530, Amit Kapila wrote: > + * from inside a signal handler in latch_sigusr1_handler(). > > * > > * Note: we assume that the kernel calls involved in drainSelfPipe() > > * and SetLatch() will provide adequate synchronization on machines > > * with weak memory ord

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-03-19 Thread Constantin S. Pan
On Thu, 17 Mar 2016 13:21:32 +0530 Amit Kapila wrote: > On Wed, Mar 16, 2016 at 7:50 PM, Constantin S. Pan > wrote: > > > > On Wed, 16 Mar 2016 18:08:38 +0530 > > Amit Kapila wrote: > > > > > > > > Why backend just waits, why can't it does the same work as any > > > worker does? In general, fo

Re: [HACKERS] [PATCH] Integer overflow in timestamp[tz]_part() and date/time boundaries check

2016-03-19 Thread Tom Lane
I had almost gotten to the point of being willing to commit this patch when I noticed that it fails to fix the originally-complained-of-problem: regression=# set time zone 'GMT+1'; SET regression=# select '4714-11-24 00:00:00+00 BC'::timestamptz; timestamptz ---

Re: [HACKERS] Relation extension scalability

2016-03-19 Thread Dilip Kumar
On Mon, Mar 14, 2016 at 8:26 AM, Petr Jelinek wrote: > Well any value we choose will be very arbitrary. If we look at it from the > point of maximum absolute disk space we allocate for relation at once, > the 4MB limit would represent 2.5 orders of magnitude change. That sounds > like enough for

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 > >> preexisting bug actually. Do we want

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2016-03-19 Thread Pavel Stehule
Hi 2016-03-17 21:02 GMT+01:00 Pavel Stehule : > Hi > > > I am looking this patch. It looks well, but this feature doesn't respect > upper or lower chars. It enforce upper chars. This is not consistent with > any other autocomplete. > I checked it against sql help and these statements doesn't wor

Re: [HACKERS] Choosing parallel_degree

2016-03-19 Thread Julien Rouhaud
On 16/03/2016 18:42, Robert Haas wrote: > On Wed, Mar 16, 2016 at 1:23 PM, Julien Rouhaud > wrote: >> On 16/03/2016 17:55, Robert Haas wrote: >>> On Wed, Mar 16, 2016 at 12:47 PM, Julien Rouhaud >>> wrote: Something like a "min_parallel_degree" then ? >>> >>> Why not just parallel_degree wit

Re: [HACKERS] Parallel Aggregate

2016-03-19 Thread David Rowley
On 17 March 2016 at 01:29, Robert Haas wrote: > On Wed, Mar 16, 2016 at 8:19 AM, Amit Kapila wrote: >> Isn't it better to call it as Parallel Aggregate instead of Partial >> Aggregate. Initialy, we have kept Partial for seqscan, but later on we >> changed to Parallel Seq Scan, so I am not able t

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-03-19 Thread Joe Conway
On 03/16/2016 09:38 AM, Pavel Stehule wrote: > 2016-03-16 16:50 GMT+01:00 Pavel Stehule >: > 2016-03-16 16:46 GMT+01:00 Joe Conway >: > > On 03/15/2016 05:17 PM, Tom Lane wrote: > > In short, I think we should rej

Re: [HACKERS] Parallel Aggregate

2016-03-19 Thread Robert Haas
On Fri, Mar 18, 2016 at 10:32 PM, David Rowley wrote: > Updated patch is attached. I think this looks structurally correct now, and I think it's doing the right thing as far as parallelism is concerned. I don't see any obvious problems in the rest of it, either, but I haven't thought hugely deep

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

2016-03-19 Thread Amit Kapila
On Thu, Mar 17, 2016 at 7:33 AM, Michael Paquier wrote: > > On Wed, Mar 16, 2016 at 5:28 AM, Robert Haas wrote: > > On Tue, Mar 15, 2016 at 9:17 AM, Thomas Reiss wrote: > >> Here's a small docpatch to fix two typos in the new documentation. > > > > Thanks, committed. > > I just had a quick look

Re: [HACKERS] Proposal: SET ROLE hook

2016-03-19 Thread Joe Conway
On 03/16/2016 08:28 AM, David Steele wrote: > On 3/6/16 1:17 AM, Pavel Stehule wrote: > >> 2016-03-05 21:49 GMT+01:00 Joe Conway > >: >> >> I still don't see any point in trying to pass data back from the hooks >> as the extension can maintain that state just fin

Re: [HACKERS] [COMMITTERS] pgsql: Improve memory management for external sorts.

2016-03-19 Thread Robert Haas
On Fri, Mar 18, 2016 at 4:22 PM, Peter Geoghegan wrote: > On Fri, Mar 18, 2016 at 11:43 AM, Andres Freund wrote: >> Yes, that removes the warning, and looks correct. > > Thanks. We should be careful to not repeat this mistake when the > quicksort patch goes in. It would be helpful if you could e

Re: [HACKERS] Patch: fix lock contention for HASHHDR.mutex

2016-03-19 Thread Robert Haas
On Sat, Mar 19, 2016 at 12:28 AM, Amit Kapila wrote: > Won't in theory, without patch as well nentries can overflow after running > for very long time? I think with patch it is more prone to overflow because > we start borrowing from other free lists as well. Uh, I don't think so. Without the p

Re: [HACKERS] Idle In Transaction Session Timeout, revived

2016-03-19 Thread Robert Haas
On Fri, Mar 18, 2016 at 10:08 PM, Jeff Janes wrote: > On Wed, Mar 16, 2016 at 8:32 AM, Robert Haas wrote: >> >> Committed with slight changes to the docs, and I added a flag variable >> instead of relying on IdleInTransactionSessionTimeout not changing at >> an inopportune time. > > Thanks for co

Re: [HACKERS] FIX : teach expression walker about RestrictInfo

2016-03-19 Thread Robert Haas
On Wed, Apr 29, 2015 at 12:33 PM, Tomas Vondra wrote: > On 04/29/15 18:26, Tom Lane wrote: >> Tomas Vondra writes: >>> OK, let me explain the context a bit more. When working on the >>> multivariate statistics patch, I need to choose which stats to use for >>> estimating the clauses. I do that in

Re: [HACKERS] Re: [COMMITTERS] pgsql: Only try to push down foreign joins if the user mapping OIDs mat

2016-03-19 Thread Tom Lane
Robert Haas writes: > On Wed, Mar 16, 2016 at 4:10 AM, Ashutosh Bapat < > ashutosh.ba...@enterprisedb.com> wrote: >> In 9.5, postgres_fdw allowed to prepare statements involving foreign >> tables without an associated user mapping as long as planning did not >> require the user mapping. Remember,

Re: [HACKERS] improving GROUP BY estimation

2016-03-19 Thread Tomas Vondra
On 03/13/2016 11:09 PM, Tomas Vondra wrote: Hi, On Sun, 2016-03-13 at 15:24 +, Dean Rasheed wrote: On 4 March 2016 at 13:10, Tomas Vondra wrote: ... >>> I think that a better formula to use would be reldistinct *= (1 - powl(1 - rel-rows / rel->tuples, rel->tuples / reldistinct) Att

<    1   2   3   4   >