Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-28 Thread Thomas Munro
On Fri, May 29, 2015 at 7:56 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, May 28, 2015 at 8:51 AM, Robert Haas robertmh...@gmail.com wrote: [ speculation ] [...] However, since the vacuum did advance relfrozenxid, it will call vac_truncate_clog, which will call SetMultiXactIdLimit,

Re: [HACKERS] useless assignment pointer argument

2015-05-28 Thread Andres Freund
On 2015-05-28 20:14:33 +, Gaetano Mendola wrote: src/backend/commands/explain.c:1692 src/backend/commands/explain.c:1874 src/backend/commands/explain.c:1986 there is the following assignment: ancestors = list_delete_first(ancestors); but it has no effect at all being that a

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Joshua D. Drake
On 05/28/2015 01:11 PM, Andrew Dunstan wrote: This seems to come up regularly. Maybe we should put it in an FAQ somewhere. The barriers to making non-core types into core types are very very high, possibly insurmountable. This is pretty much not an option. O.k., then either: * We install

Re: [HACKERS] psql tabcomplete - minor bugfix - tabcomplete for SET ROLE TO xxx

2015-05-28 Thread Peter Eisentraut
On 5/22/15 6:35 AM, Pavel Stehule wrote: we support SET ROLE name and SET ROLE TO name. Second form isn't supported by tabcomplete. Attached trivial patch fixes it. We don't tab-complete everything we possibly could. The documentation only lists the first form, so I don't think we necessarily

Re: [HACKERS] fsync-pgdata-on-recovery tries to write to more files than previously

2015-05-28 Thread Tom Lane
Abhijit Menon-Sen a...@2ndquadrant.com writes: Here's an updated patch for the fsync problem(s). I've committed this after some mostly-cosmetic rearrangements. 4. As a partial aside, why does fsync_fname use OpenTransientFile? It looks like it should use BasicOpenFile as pre_sync_fname

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-28 Thread Alvaro Herrera
Robert Haas wrote: On Thu, May 28, 2015 at 8:51 AM, Robert Haas robertmh...@gmail.com wrote: [ speculation ] OK, I finally managed to reproduce this, after some off-list help from Steve Kehlet (the reporter), Alvaro, and Thomas Munro. Here's how to do it: It's a long list of steps, but

Re: [HACKERS] useless assignment pointer argument

2015-05-28 Thread Gaetano Mendola
If the compiler is good the assignment is elided indeed, that's not what I meant to point out. On Thu, 28 May 2015 at 22:17 Andres Freund and...@anarazel.de wrote: On 2015-05-28 20:14:33 +, Gaetano Mendola wrote: src/backend/commands/explain.c:1692 src/backend/commands/explain.c:1874

[HACKERS] useless assignment pointer argument

2015-05-28 Thread Gaetano Mendola
Hi, in the following spots: src/backend/commands/explain.c:1692 src/backend/commands/explain.c:1874 src/backend/commands/explain.c:1986 there is the following assignment: ancestors = list_delete_first(ancestors); but it has no effect at all being that a function parameter and not used

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-28 Thread Joshua D. Drake
On 05/28/2015 12:56 PM, Robert Haas wrote: FTR: Robert, you have been a Samurai on this issue. Our many thanks. Sincerely, jD -- Command Prompt, Inc. - http://www.commandprompt.com/ 503-667-4564 PostgreSQL Centered full stack support, consulting and development. Announcing I'm offended

Re: [HACKERS] Free indexed_tlist memory explicitly within set_plan_refs()

2015-05-28 Thread Peter Geoghegan
On Sun, May 24, 2015 at 6:17 PM, Peter Geoghegan p...@heroku.com wrote: Attached patch adds such a pfree() call. Attached, revised version incorporates this small fix, while adding an additional big fix, and a number of small style tweaks. This is mainly concerned with fixing the bug I was

Re: [HACKERS] PGCon hacker lounge

2015-05-28 Thread Jim Nasby
On 5/28/15 9:43 AM, Dan Langille wrote: It seems it goes unused, and I was trying to see if anyone found it useful in the past. At BSDCan, for example, you can find people there every night discussing and working. Or perhaps just socializing. It's a major gathering point. ISTM that

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Joshua D. Drake
On 05/28/2015 12:35 PM, Stephen Frost wrote: JD, What we would need for this is an 'extensions' directory, or similar, and a clear definition of what the requirements are around getting into it are. With that, we could decide for each module currently in contrib if it should go into the

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Andrew Dunstan
On 05/28/2015 04:05 PM, Joshua D. Drake wrote: On 05/28/2015 12:35 PM, Stephen Frost wrote: JD, What we would need for this is an 'extensions' directory, or similar, and a clear definition of what the requirements are around getting into it are. With that, we could decide for each module

Re: [HACKERS] Possible pointer dereference

2015-05-28 Thread Gaetano Mendola
While at it the assert(cnfa != NULL cnfa-nstates != 0); at src/backend/regex/rege_dfa.c:282 is issued too late indeed at line 278 and 279 cnfa was already dereferenced. Same for assert(t != NULL) in src/backend/regex/regexec.c:821 is issued way too late. On Thu, 28 May 2015 at 15:59 Tom

Re: [HACKERS] About that re-release ...

2015-05-28 Thread Josh Berkus
On 05/28/2015 02:37 AM, Marco Atzeri wrote: On 5/28/2015 5:00 AM, Tom Lane wrote: Assuming that we can get a fix for the fsync-failure-during-restart problem committed by the end of the week, there will be a new set of back-branch minor releases next week. Usual schedule, wrap Monday for

Re: [HACKERS] Improving GEQO

2015-05-28 Thread boix
We follow your advice, our goal is improve the quality of the solution and we made it,however the total query execution time is higher. Regards. On 05/27/2015 04:36 PM, Tom Lane wrote: boix b...@uclv.cu writes: Hello, my partner and me are working with the goal of improve the GEQO's

Re: [HACKERS] fsync-pgdata-on-recovery tries to write to more files than previously

2015-05-28 Thread Abhijit Menon-Sen
At 2015-05-28 19:56:15 +0530, a...@2ndquadrant.com wrote: I have a separate patch to initdb with the corresponding changes, which I will post after dinner and a bit more testing. Here's that patch too. I was a bit unsure how far to go with this. It fixes the problem of not following pg_xlog

Re: [HACKERS] Improving GEQO

2015-05-28 Thread Merlin Moncure
On Wed, May 27, 2015 at 3:06 PM, boix b...@uclv.cu wrote: Hello, my partner and me are working with the goal of improve the GEQO's performance, we tried with Ant Colony Optimization, but it does not improve, actually we are trying with a new variant of Genetic Algorithm, specifically Micro-GA.

Re: [HACKERS] About that re-release ...

2015-05-28 Thread Marco Atzeri
On 5/28/2015 7:10 PM, Josh Berkus wrote: On 05/28/2015 02:37 AM, Marco Atzeri wrote: On 5/28/2015 5:00 AM, Tom Lane wrote: Assuming that we can get a fix for the fsync-failure-during-restart problem committed by the end of the week, there will be a new set of back-branch minor releases next

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-28 Thread Robert Haas
On Thu, May 28, 2015 at 8:51 AM, Robert Haas robertmh...@gmail.com wrote: [ speculation ] OK, I finally managed to reproduce this, after some off-list help from Steve Kehlet (the reporter), Alvaro, and Thomas Munro. Here's how to do it: 1. Install any pre-9.3 version of the server and generate

Re: [HACKERS] fsync-pgdata-on-recovery tries to write to more files than previously

2015-05-28 Thread Robert Haas
On Thu, May 28, 2015 at 1:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, May 28, 2015 at 10:26 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: 2. Robert, are you comfortable with what fsync_pgdata() does in xlog.c? I wasn't sure if I should move

Re: [HACKERS] Improving GEQO

2015-05-28 Thread Atri Sharma
On Fri, May 29, 2015 at 12:59 AM, Merlin Moncure mmonc...@gmail.com wrote: On Wed, May 27, 2015 at 3:06 PM, boix b...@uclv.cu wrote: Hello, my partner and me are working with the goal of improve the GEQO's performance, we tried with Ant Colony Optimization, but it does not improve,

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Stephen Frost
JD, * Joshua D. Drake (j...@commandprompt.com) wrote: Contrib according to the docs is: These include porting tools, analysis utilities, and plug-in features that are not part of the core PostgreSQL system, mainly because they address a limited audience or are too experimental to be part

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Andrew Dunstan
On 05/28/2015 04:22 PM, Joshua D. Drake wrote: On 05/28/2015 01:11 PM, Andrew Dunstan wrote: This seems to come up regularly. Maybe we should put it in an FAQ somewhere. The barriers to making non-core types into core types are very very high, possibly insurmountable. This is pretty much

[HACKERS] auto_explain sample rate

2015-05-28 Thread Craig Ringer
Hi all It's sometimes desirable to collect auto_explain data with ANALYZE in order to track down hard-to-reproduce issues, but the performance impacts can be pretty hefty on the DB. I'm inclined to add a sample rate to auto_explain so that it can trigger only on x percent of queries, and also

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Stephen Frost
JD, * Joshua D. Drake (j...@commandprompt.com) wrote: On 05/28/2015 06:50 PM, Peter Eisentraut wrote: On 5/28/15 3:35 PM, Stephen Frost wrote: What we would need for this is an 'extensions' directory, or similar, and a clear definition of what the requirements are around getting into it are.

Re: [HACKERS] useless assignment pointer argument

2015-05-28 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-05-28 20:14:33 +, Gaetano Mendola wrote: src/backend/commands/explain.c:1692 src/backend/commands/explain.c:1874 src/backend/commands/explain.c:1986 there is the following assignment: ancestors = list_delete_first(ancestors); but it

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Peter Eisentraut
On 5/28/15 3:35 PM, Stephen Frost wrote: What we would need for this is an 'extensions' directory, or similar, and a clear definition of what the requirements are around getting into it are. With that, we could decide for each module currently in contrib if it should go into the 'extensions'

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-28 Thread Robert Haas
On Thu, May 28, 2015 at 10:41 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: 2. If you pg_upgrade to 9.3.7 or 9.4.2, then you may have datminmxid values which are equal to the next-mxid counter instead of the correct value; in other words, they are too new. [ discussion of how the control

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-28 Thread Robert Haas
On Thu, May 28, 2015 at 4:06 PM, Joshua D. Drake j...@commandprompt.com wrote: FTR: Robert, you have been a Samurai on this issue. Our many thanks. Thanks! I really appreciate the kind words. So, in thinking through this situation further, it seems to me that the situation is pretty dire: 1.

Re: [HACKERS] pg_upgrade resets timeline to 1

2015-05-28 Thread Noah Misch
On Thu, May 28, 2015 at 05:26:56PM +0200, Christoph Berg wrote: Re: Noah Misch 2015-05-28 20150528150234.ga4111...@tornado.leadboat.com To clarify for the archives, the 2015-05-16 changes did not revert to 9.3 and earlier behavior. Rather, they standardized on the

Re: [HACKERS] pg_upgrade resets timeline to 1

2015-05-28 Thread Gavin Flower
On 29/05/15 12:59, Noah Misch wrote: On Thu, May 28, 2015 at 05:26:56PM +0200, Christoph Berg wrote: Re: Noah Misch 2015-05-28 20150528150234.ga4111...@tornado.leadboat.com To clarify for the archives, the 2015-05-16 changes did not revert to 9.3 and earlier behavior. Rather, they

Re: [HACKERS] Free indexed_tlist memory explicitly within set_plan_refs()

2015-05-28 Thread Peter Geoghegan
On Thu, May 28, 2015 at 2:37 PM, Peter Geoghegan p...@heroku.com wrote: A second attached patch fixes another, largely independent bug. I noticed array assignment with ON CONFLICT DO UPDATE was broken. See commit message for full details. Finally, here is a third patch, fixing the final bug

[HACKERS] [PATCH] Document that directly callable functions may use fn_extra

2015-05-28 Thread Craig Ringer
Hi all I was a puzzled by src/backend/utils/fmgr/README and fmgr.h's descriptions of fcinfo-flinfo-fn_extra (FmgrInfo.fn_extra) as they seem to conflict with actual usage. The docs suggest that fl_extra is for the use of function call handlers, but in practice it's also used heavily by function

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Joshua D. Drake
On 05/28/2015 06:50 PM, Peter Eisentraut wrote: On 5/28/15 3:35 PM, Stephen Frost wrote: What we would need for this is an 'extensions' directory, or similar, and a clear definition of what the requirements are around getting into it are. With that, we could decide for each module currently

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-28 Thread Alvaro Herrera
Robert Haas wrote: 2. If you pg_upgrade to 9.3.7 or 9.4.2, then you may have datminmxid values which are equal to the next-mxid counter instead of the correct value; in other words, they are too new. What you describe is what happens if you upgrade from 9.2 or earlier. For this case we use

Re: [HACKERS] hstore_plpython regression test does not work on Python 3

2015-05-28 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On 5/26/15 5:19 PM, Oskari Saarenmaa wrote: Looks like that animal uses Python 3.4. Python 3.3 and newer versions default to using a random seed for hashing objects into dicts which makes the order of dict elements random; see

Re: [HACKERS] RFC: Non-user-resettable SET SESSION AUTHORISATION

2015-05-28 Thread Noah Misch
On Tue, May 26, 2015 at 10:06:59PM -0400, Robert Haas wrote: On Sat, May 23, 2015 at 8:14 PM, Noah Misch n...@leadboat.com wrote: On Tue, May 19, 2015 at 04:49:26PM -0400, Robert Haas wrote: A protocol extension avoids all of that trouble, and can be target for 9.6 just like any other

Re: [HACKERS] [PATCH] readlink missing nul-termination in pg_rewind

2015-05-28 Thread Michael Paquier
On Fri, May 29, 2015 at 1:46 AM, Tom Lane t...@sss.pgh.pa.us wrote: Abhijit Menon-Sen a...@2ndquadrant.com writes: P.S. Also in passing, I note that pg_rewind will follow links under any directory anywhere named pg_tblspc (which probably doesn't matter), and does not follow pg_xlog if it's a

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Joshua D. Drake
On 05/28/2015 06:25 PM, Andrew Dunstan wrote: I'd be ok with installing it by default. But the case that's a lot harder to require to be always installed is pgcrypto, as has often been discussed in the past. It used to be but IIRC we don't have those restrictions anymore. If so, then we

Re: [HACKERS] Patch to improve a few appendStringInfo* calls

2015-05-28 Thread Peter Eisentraut
On 5/12/15 4:33 AM, David Rowley wrote: Shortly after I sent the previous patch I did a few more searches and also found some more things that are not quite right. Most of these are to use the binary append method when the length of the string is already known. For these cases it might be

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Amit Langote
On 2015-05-29 AM 11:14, Joshua D. Drake wrote: pg_trgm has been in contrib for a decade of not more. Either rip it out or include it by default. There are jsonb gin operator class related files in src/backend/utils/adt/. Perhaps, trgm_gin.c, trgm_gist.c, trgm_op.c could be moved there.

Re: [HACKERS] hstore_plpython regression test does not work on Python 3

2015-05-28 Thread Peter Eisentraut
On 5/26/15 5:19 PM, Oskari Saarenmaa wrote: [1] http://pgbuildfarm.org/cgi-bin/show_history.pl?nm=jaguarundibr=HEAD Looks like that animal uses Python 3.4. Python 3.3 and newer versions default to using a random seed for hashing objects into dicts which makes the order of dict elements

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-28 Thread Alvaro Herrera
Alvaro Herrera wrote: Robert Haas wrote: 2. If you pg_upgrade to 9.3.7 or 9.4.2, then you may have datminmxid values which are equal to the next-mxid counter instead of the correct value; in other words, they are too new. What you describe is what happens if you upgrade from 9.2 or

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Joshua D. Drake
On 05/28/2015 08:10 PM, Stephen Frost wrote: JD, This seems reasonable to me. It's in line with the recent move from contrib to bin. It'll just be quite a bit bigger of an undertaking. (50 threads to discuss the merits of each module separately?) Maybe start by picking the top 5 and sort

Re: [HACKERS] fsync-pgdata-on-recovery tries to write to more files than previously

2015-05-28 Thread Tom Lane
Abhijit Menon-Sen a...@2ndquadrant.com writes: I have to leave shortly, so I'll look at the initdb cleanup tomorrow. Here's a revision of that patch that's more along the lines of what you committed. Will look at that tomorrow ... It occurred to me that we should probably also silently skip

Re: [HACKERS] fsync-pgdata-on-recovery tries to write to more files than previously

2015-05-28 Thread Abhijit Menon-Sen
At 2015-05-28 17:37:16 -0400, t...@sss.pgh.pa.us wrote: I've committed this after some mostly-cosmetic rearrangements. Thank you. I have to leave shortly, so I'll look at the initdb cleanup tomorrow. Here's a revision of that patch that's more along the lines of what you committed. It

Re: [HACKERS] auto_explain sample rate

2015-05-28 Thread Tom Lane
Craig Ringer cr...@2ndquadrant.com writes: It's sometimes desirable to collect auto_explain data with ANALYZE in order to track down hard-to-reproduce issues, but the performance impacts can be pretty hefty on the DB. I'm inclined to add a sample rate to auto_explain so that it can trigger

Re: [HACKERS] hstore_plpython regression test does not work on Python 3

2015-05-28 Thread Oskari Saarenmaa
29.05.2015, 03:12, Peter Eisentraut kirjoitti: On 5/26/15 5:19 PM, Oskari Saarenmaa wrote: [1] http://pgbuildfarm.org/cgi-bin/show_history.pl?nm=jaguarundibr=HEAD Looks like that animal uses Python 3.4. Python 3.3 and newer versions default to using a random seed for hashing objects into

Re: [HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Guillaume Lelarge
Le 29 mai 2015 5:33 AM, Joshua D. Drake j...@commandprompt.com a écrit : On 05/28/2015 08:10 PM, Stephen Frost wrote: JD, This seems reasonable to me. It's in line with the recent move from contrib to bin. It'll just be quite a bit bigger of an undertaking. (50 threads to discuss the

Re: [HACKERS] pg_upgrade resets timeline to 1

2015-05-28 Thread Noah Misch
On Wed, May 27, 2015 at 05:40:09PM +0200, Christoph Berg wrote: commit 4c5e060049a3714dd27b7f4732fe922090edea69 Author: Bruce Momjian br...@momjian.us Date: Sat May 16 00:40:18 2015 -0400 pg_upgrade: force timeline 1 in the new cluster Previously, this prevented promoted

Re: [HACKERS] [COMMITTERS] pgsql: Row-Level Security Policies (RLS)

2015-05-28 Thread Dean Rasheed
On 27 May 2015 at 14:51, Stephen Frost sfr...@snowman.net wrote: On 27 May 2015 at 02:42, Stephen Frost sfr...@snowman.net wrote: Now, looking at the code, I'm actually failing to see a case where we use the RowSecurityPolicy-policy_name.. Perhaps *that's* what we should be looking to

Re: [HACKERS] pg_upgrade resets timeline to 1

2015-05-28 Thread Simon Riggs
On 27 May 2015 at 18:42, Bruce Momjian br...@momjian.us wrote: On Wed, May 27, 2015 at 05:40:09PM +0200, Christoph Berg wrote: commit 4c5e060049a3714dd27b7f4732fe922090edea69 Author: Bruce Momjian br...@momjian.us Date: Sat May 16 00:40:18 2015 -0400 pg_upgrade: force timeline 1

Re: [HACKERS] [COMMITTERS] pgsql: Add pg_audit, an auditing extension

2015-05-28 Thread Heikki Linnakangas
On 05/28/2015 06:04 AM, Joshua D. Drake wrote: On 05/27/2015 07:02 PM, Stephen Frost wrote: regardless of if they are included in the main git repo or not. Being in the repo represents the support of the overall community and PGDG, which is, understandably in my view, highly valuable to the

Re: [HACKERS] WIP: Enhanced ALTER OPERATOR

2015-05-28 Thread Alexander Korotkov
On Wed, May 27, 2015 at 9:28 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, May 18, 2015 at 10:21 AM, Tom Lane t...@sss.pgh.pa.us wrote: Uriy Zhuravlev u.zhurav...@postgrespro.ru writes: I have attached a patch that extends ALTER OPERATOR to support COMMUTATOR, NEGATOR, RESTRICT and

Re: [HACKERS] [COMMITTERS] pgsql: Row-Level Security Policies (RLS)

2015-05-28 Thread Stephen Frost
Dean, * Dean Rasheed (dean.a.rash...@gmail.com) wrote: On 27 May 2015 at 14:51, Stephen Frost sfr...@snowman.net wrote: On 27 May 2015 at 02:42, Stephen Frost sfr...@snowman.net wrote: Now, looking at the code, I'm actually failing to see a case where we use the

Re: [HACKERS] pg_upgrade resets timeline to 1

2015-05-28 Thread Christoph Berg
Re: Noah Misch 2015-05-28 20150528072721.ga4102...@tornado.leadboat.com I've just had trouble getting barman to work again after a 9.1-9.4.2 upgrade, and I think part of the problem was that the WAL for this cluster got reset from timeline 2 to 1, which made barman's incoming WALs

Re: [HACKERS] [COMMITTERS] pgsql: Add pg_audit, an auditing extension

2015-05-28 Thread Heikki Linnakangas
On 05/28/2015 11:14 AM, Stephen Frost wrote: * Heikki Linnakangas (hlinn...@iki.fi) wrote: 1. it's not flexible enough. How do you specify that all READs on super_secret table must be logged, but on less_secret table, it's enough to log only WRITEs? This is actually what that pg_audit.role

Re: [HACKERS] [BUGS] pg_get_functiondef() does not show LEAKPROOF for leakproof functions

2015-05-28 Thread Michael Paquier
On Thu, May 28, 2015 at 5:52 PM, Jeevan Chalke jeevan.cha...@enterprisedb.com wrote: If function is created with the LEAKPROOF option, then pg_get_functiondef() does not show that in the returned definition. Is it expected OR are we missing that option in pg_get_functiondef(). However only

Re: [HACKERS] Re: [GENERAL] 9.4.1 - 9.4.2 problem: could not access status of transaction 1

2015-05-28 Thread Robert Haas
On Thu, May 28, 2015 at 8:03 AM, Robert Haas robertmh...@gmail.com wrote: Steve, is there any chance we can get your pg_controldata output and a list of all the files in pg_clog? Err, make that pg_multixact/members, which I assume is at issue here. You didn't show us the DETAIL line from this

[HACKERS] Memory leak with XLogFileCopy since de768844 (WAL file with .partial)

2015-05-28 Thread Michael Paquier
Hi all, Since commit de768844, XLogFileCopy of xlog.c returns to caller a pstrdup'd string that can be used afterwards for other things. XLogFileCopy is used in only one place, and it happens that the result string is never freed at all, leaking memory. Attached is a patch to fix the problem.

Re: [HACKERS] Possible pointer dereference

2015-05-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, May 27, 2015 at 8:57 PM, Haribabu Kommi kommi.harib...@gmail.com wrote: By correcting the following way will solve the problem. return ts ? (*ts != 0) : false; instead of retun *ts != 0; Attached a patch for it. If the only caller always

Re: [HACKERS] pg_upgrade resets timeline to 1

2015-05-28 Thread Bruce Momjian
On Thu, May 28, 2015 at 08:47:07AM +0100, Simon Riggs wrote: We could have pg_upgrade increment the timeline and allow for missing history files, but that doesn't fix problems with non-pg_upgrade upgrades, which also should never be sharing WAL files from previous major

Re: [HACKERS] fsync-pgdata-on-recovery tries to write to more files than previously

2015-05-28 Thread Abhijit Menon-Sen
Hi. Here's an updated patch for the fsync problem(s). A few points that may be worth considering: 1. I've made the ReadDir → ReadDirExtended change, but in retrospect I don't think it's really worth it. Using ReadDir and letting it die is probably fine. (Aside: I left ReadDirExtended

Re: [HACKERS] rhel6 rpm file locations

2015-05-28 Thread Ted Toth
Are there any other packagers following the Fedora 'standards' that you are aware of? On Wed, May 27, 2015 at 2:40 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, May 27, 2015 at 3:25 PM, Ted Toth txt...@gmail.com wrote: On Wed, May 27, 2015 at 1:31 PM, Robert Haas robertmh...@gmail.com

Re: [HACKERS] [Proposal] More Vacuum Statistics

2015-05-28 Thread Tom Lane
Naoya Anzai nao-an...@xc.jp.nec.com writes: In my much experience up until now,I have an idea that we can add 2 new vacuum statistics into pg_stat_xxx_tables. Adding new stats in that way requires adding per-table counters, which bloat the statistics files (especially in database with very

Re: [HACKERS] [BUGS] pg_get_functiondef() does not show LEAKPROOF for leakproof functions

2015-05-28 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: On Thu, May 28, 2015 at 5:52 PM, Jeevan Chalke jeevan.cha...@enterprisedb.com wrote: If function is created with the LEAKPROOF option, then pg_get_functiondef() does not show that in the returned definition. Is it expected OR are we missing

Re: [HACKERS] pg_upgrade resets timeline to 1

2015-05-28 Thread Bruce Momjian
On Thu, May 28, 2015 at 10:13:14AM +0200, Christoph Berg wrote: Re: Bruce Momjian 2015-05-28 20150527221607.ga7...@momjian.us Well, if you used pg_dump/pg_restore, you would have had even larger problems as the file names would have matched. True, but even here it's possible that files get

Re: [HACKERS] pg_upgrade resets timeline to 1

2015-05-28 Thread Noah Misch
On Thu, May 28, 2015 at 10:18:18AM +0200, Christoph Berg wrote: Re: Noah Misch 2015-05-28 20150528072721.ga4102...@tornado.leadboat.com I've just had trouble getting barman to work again after a 9.1-9.4.2 upgrade, and I think part of the problem was that the WAL for this cluster got

Re: [HACKERS] pg_upgrade resets timeline to 1

2015-05-28 Thread Noah Misch
On Thu, May 28, 2015 at 10:20:58AM -0400, Bruce Momjian wrote: On Thu, May 28, 2015 at 08:47:07AM +0100, Simon Riggs wrote: What we should be saying is that the last timeline doesn't need a history file. Then no change is needed here. Yes, that would make a lot more sense than what we

Re: [HACKERS] PGCon hacker lounge

2015-05-28 Thread Dan Langille
On May 27, 2015, at 12:06 PM, Alexander Korotkov a.korot...@postgrespro.ru wrote: On Wed, May 27, 2015 at 7:00 PM, Dan Langille d...@langille.org mailto:d...@langille.org wrote: Have you been to PGCon before? Do you remember the hacker lounge? Do you remember going there to work on

Re: [HACKERS] pg_upgrade resets timeline to 1

2015-05-28 Thread Bruce Momjian
On Thu, May 28, 2015 at 10:39:15AM -0400, Noah Misch wrote: It looks like an upgrade from 9.1.x to 9.3.0 or later has always set the new timeline identifier (TLI) to 1. My testing confirms this for an upgrade from 9.1.16 to 9.4.1 and for an upgrade from 9.1.16 to 9.4.2, so I

[HACKERS] proleakproof vs opr_sanity test

2015-05-28 Thread Tom Lane
In view of http://www.postgresql.org/message-id/CAM2+6=u5ylzbre3v3wf9fful0gxr1ega3miph1gu0jpseud...@mail.gmail.com I went trawling for other places where the LEAKPROOF patch might have overlooked something, by dint of grepping for prosecdef and seeing if there was or should be parallel code for

Re: [HACKERS] rhel6 rpm file locations

2015-05-28 Thread Jeff Frost
On May 27, 2015, at 12:40 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, May 27, 2015 at 3:25 PM, Ted Toth txt...@gmail.com wrote: On Wed, May 27, 2015 at 1:31 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, May 27, 2015 at 11:35 AM, Ted Toth txt...@gmail.com wrote: I'm trying

[HACKERS] RFC: Remove contrib entirely

2015-05-28 Thread Joshua D. Drake
Hello, This is a topic that has come up in various ways over the years. After the long thread on pg_audit, I thought it might be time to bring it up again. Contrib according to the docs is: These include porting tools, analysis utilities, and plug-in features that are not part of the core

Re: [HACKERS] fsync-pgdata-on-recovery tries to write to more files than previously

2015-05-28 Thread Robert Haas
On Thu, May 28, 2015 at 10:26 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: 2. Robert, are you comfortable with what fsync_pgdata() does in xlog.c? I wasn't sure if I should move that to fd.c as well. I think it's borderline OK for now. I think if the function is specific as

Re: [HACKERS] rhel6 rpm file locations

2015-05-28 Thread Devrim GÜNDÜZ
Hi, On Thu, 2015-05-28 at 08:54 -0500, Ted Toth wrote: Are there any other packagers following the Fedora 'standards' that you are aware of? It is not about following the standards or not. Unlike distro RPMs, you can install multiple PostgreSQL versions into the same box using community RPMS.

Re: [HACKERS] [COMMITTERS] pgsql: Add pg_audit, an auditing extension

2015-05-28 Thread Stephen Frost
Heikki, * Heikki Linnakangas (hlinn...@iki.fi) wrote: On 05/28/2015 11:14 AM, Stephen Frost wrote: * Heikki Linnakangas (hlinn...@iki.fi) wrote: 1. it's not flexible enough. How do you specify that all READs on super_secret table must be logged, but on less_secret table, it's enough to log

Re: [HACKERS] About that re-release ...

2015-05-28 Thread Robert Haas
On Wed, May 27, 2015 at 11:08 PM, Robert Haas robertmh...@gmail.com wrote: What about http://www.postgresql.org/message-id/20150527222142.ge5...@postgresql.org ? I believe that is also a 9.4.2 regression, and a serious one. Oh? There was nothing in the thread that suggested to me that it

[HACKERS] [PATCH] readlink missing nul-termination in pg_rewind

2015-05-28 Thread Abhijit Menon-Sen
This is just something I noticed in passing. (I did a quick check of all the other uses of readlink in the source, and they do get this right.) -- Abhijit P.S. Also in passing, I note that pg_rewind will follow links under any directory anywhere named pg_tblspc (which probably doesn't matter),

Re: [HACKERS] WIP: Enhanced ALTER OPERATOR

2015-05-28 Thread Tom Lane
Alexander Korotkov a.korot...@postgrespro.ru writes: Could we address both this problems by denying changing existing commutators and negator? ISTM that setting absent commutator and negator is quite enough for ALTER OPERATOR. User extensions could need setting of commutator and negator

Re: [HACKERS] pg_upgrade resets timeline to 1

2015-05-28 Thread Christoph Berg
Re: Noah Misch 2015-05-28 20150528150234.ga4111...@tornado.leadboat.com On Thu, May 28, 2015 at 10:20:58AM -0400, Bruce Momjian wrote: On Thu, May 28, 2015 at 08:47:07AM +0100, Simon Riggs wrote: What we should be saying is that the last timeline doesn't need a history file. Then no

Re: [HACKERS] [PATCH] readlink missing nul-termination in pg_rewind

2015-05-28 Thread Tom Lane
Abhijit Menon-Sen a...@2ndquadrant.com writes: This is just something I noticed in passing. (I did a quick check of all the other uses of readlink in the source, and they do get this right.) There's more random inconsistency than just this. I think we should standardize on the coding exhibited

Re: [HACKERS] [PATCH] readlink missing nul-termination in pg_rewind

2015-05-28 Thread Tom Lane
Abhijit Menon-Sen a...@2ndquadrant.com writes: P.S. Also in passing, I note that pg_rewind will follow links under any directory anywhere named pg_tblspc (which probably doesn't matter), and does not follow pg_xlog if it's a symlink (which probably does). If you want, I can submit a trivial

Re: [HACKERS] fsync-pgdata-on-recovery tries to write to more files than previously

2015-05-28 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, May 28, 2015 at 10:26 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: 2. Robert, are you comfortable with what fsync_pgdata() does in xlog.c? I wasn't sure if I should move that to fd.c as well. I think it's borderline OK for now. I think