Re: [HACKERS] nodes/*funcs.c inconsistencies

2015-08-02 Thread Noah Misch
On Sun, Aug 02, 2015 at 11:31:16PM -0400, Tom Lane wrote: Stephen Frost sfr...@snowman.net writes: Noah, A fresh audit found the attached problems new in 9.5[1]. Most are cosmetic INT/UINT or field order corrections. The non-cosmetic changes involve CustomPath, CustomScan, and

Re: [HACKERS] pg_rewind failure by file deletion in source server

2015-08-02 Thread Michael Paquier
On Sun, Aug 2, 2015 at 4:01 AM, Heikki Linnakangas wrote: Perhaps it's best if we copy all the WAL files from source in copy-mode, but not in libpq mode. Regarding old WAL files in the target, it's probably best to always leave them alone. They should do no harm, and as a general principle

Re: [HACKERS] Autonomous Transaction is back

2015-08-02 Thread Rajeev rastogi
On 31 July 2015 23:10, Robert Haas Wrote: On Tue, Jul 28, 2015 at 6:01 AM, Craig Ringer cr...@2ndquadrant.com wrote: That should be practical to special-case by maintaining a list of parent transaction (virtual?) transaction IDs. Attempts to wait on a lock held by any of those should fail

Re: [HACKERS] nodes/*funcs.c inconsistencies

2015-08-02 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: Noah, A fresh audit found the attached problems new in 9.5[1]. Most are cosmetic INT/UINT or field order corrections. The non-cosmetic changes involve CustomPath, CustomScan, and CreatePolicyStmt. Feature committers, if the existing treatments

Re: [HACKERS] [sqlsmith] Failed assertion in joinrels.c

2015-08-02 Thread Peter Geoghegan
On Fri, Jul 31, 2015 at 5:56 PM, Andreas Seltenreich seltenre...@gmx.de wrote: sqlsmith triggered the following assertion in master (c188204). Thanks for writing sqlsmith. It seems like a great tool. I wonder, are you just running the tool with assertions enabled when PostgreSQL is built? If

[HACKERS] [sqlsmith] subplan variable reference / unassigned NestLoopParams (was: [sqlsmith] Failed assertion in joinrels.c)

2015-08-02 Thread Andreas Seltenreich
Tom Lane writes: Well, I certainly think all of these represent bugs: 3 | ERROR: plan should not reference subplan's variable 2 | ERROR: failed to assign all NestLoopParams to plan nodes These appear to be related. The following query produces the former, but if you replace the

[HACKERS] Incorrect comment about abbreviated keys

2015-08-02 Thread Peter Geoghegan
Attached patch fixes this issue. This was missed by 78efd5c1edb59017f06ef96773e64e6539bfbc86 -- Peter Geoghegan From 47ba4759c3d460fa100f0c218b2b06834abfb3f5 Mon Sep 17 00:00:00 2001 From: Peter Geoghegan peter.geoghega...@gmail.com Date: Sun, 2 Aug 2015 02:07:55 -0700 Subject: [PATCH] Fix

Re: [HACKERS] upgrade failure from 9.5 to head

2015-08-02 Thread Andres Freund
On 2015-08-01 19:13:05 -0400, Noah Misch wrote: On Wed, Jul 29, 2015 at 04:42:55PM -0400, Andrew Dunstan wrote: The next hump is this, in restoring contrib_regression_test_ddl_parse: pg_restore: creating FUNCTION public.text_w_default_in(cstring) pg_restore: [archiver (db)] Error

[HACKERS] Minimum tuple threshold to decide last pass of VACUUM

2015-08-02 Thread Michael Paquier
Hi all, Commit 4046e58c (dated of 2001) has introduced the following comment in vacuumlazy.c: + /* If any tuples need to be deleted, perform final vacuum cycle */ + /* XXX put a threshold on min nuber of tuples here? */ + if (vacrelstats-num_dead_tuples 0) In short, we may want

[HACKERS] pageinspect patch, for showing tuple data

2015-08-02 Thread Nikolay Shaplov
Hi! I've created a patch for pageinspect that allows to see data stored in the tuple. This patch has two main purposes: 1. Practical: Make manual DB recovery more simple 2. Educational: Seeing what data is actually stored in tuple, allows to get better understanding of how does postgres

Re: [HACKERS] LWLock deadlock and gdb advice

2015-08-02 Thread Andres Freund
On 2015-08-02 12:33:06 -0400, Tom Lane wrote: Andres Freund and...@anarazel.de writes: I plan to commit the patch tomorrow, so it's included in alpha2. Please try to commit anything you want in alpha2 *today*. I'd prefer to see some successful buildfarm cycles on such patches before we

Re: [HACKERS] LWLock deadlock and gdb advice

2015-08-02 Thread Tom Lane
Andres Freund and...@anarazel.de writes: I plan to commit the patch tomorrow, so it's included in alpha2. Please try to commit anything you want in alpha2 *today*. I'd prefer to see some successful buildfarm cycles on such patches before we wrap. regards, tom lane --

Re: [HACKERS] MultiXact member wraparound protections are now enabled

2015-08-02 Thread Peter Eisentraut
On 7/28/15 9:20 AM, Robert Haas wrote: Well, I think that we can eventually downgrade or remove the message once (1) we've actually fixed all of the known multixact bugs and (2) a couple of years have gone by and most people are in the clear. Fair enough. But we should document this better in

Re: [HACKERS] Explanation for intermittent buildfarm pg_upgradecheck failures

2015-08-02 Thread Tom Lane
I wrote: Further experimentation says that 9.0-9.2 do this in the expected order; so somebody broke it during 9.3. Depressingly enough, the somebody was me. Fixed now. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

[HACKERS] Explanation for intermittent buildfarm pg_upgradecheck failures

2015-08-02 Thread Tom Lane
Observe the smoking gun at http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=muledt=2015-08-02%2003%3A30%3A02 to wit this extract from pg_upgrade_server.log: command:

Re: [HACKERS] No more libedit?! - openssl plans to switch to APL2

2015-08-02 Thread Robert Haas
On Sat, Aug 1, 2015 at 11:14 AM, Andres Freund and...@anarazel.de wrote: According to https://www.openssl.org/blog/blog/2015/08/01/cla/ openssl is planning to relicense to the apache license 2.0. While APL2 is not compatible with GLP2 it *is* compatible with GPL3. What's the connection to

Re: [HACKERS] No more libedit?! - openssl plans to switch to APL2

2015-08-02 Thread Andres Freund
On 2015-08-02 12:34:43 -0400, Robert Haas wrote: On Sat, Aug 1, 2015 at 11:14 AM, Andres Freund and...@anarazel.de wrote: According to https://www.openssl.org/blog/blog/2015/08/01/cla/ openssl is planning to relicense to the apache license 2.0. While APL2 is not compatible with GLP2 it *is*

Re: [HACKERS] Explanation for intermittent buildfarm pg_upgradecheck failures

2015-08-02 Thread Tom Lane
I wrote: unlink(/tmp/.s.PGSQL.5432)= 0 unlink(postmaster.pid)= 0 unlink(/tmp/.s.PGSQL.5432.lock) = 0 exit_group(0) = ? +++ exited with 0 +++ I haven't looked to find out why the unlinks happen in this order, but on a heavily

Re: [HACKERS] LWLock deadlock and gdb advice

2015-08-02 Thread Andres Freund
Hi Jeff, Heikki, On 2015-07-31 09:48:28 -0700, Jeff Janes wrote: I had run it for 24 hours, while it usually took less than 8 hours to look up before. I did see it within a few minutes one time when I checked out a new HEAD and then forgot to re-apply your or Heikki's patch. But now I've

Re: [HACKERS] LWLock deadlock and gdb advice

2015-08-02 Thread Andres Freund
On 2015-08-02 17:04:07 +0200, Andres Freund wrote: I've attached a version of the patch that should address Heikki's concern. It imo also improves the API and increases debuggability by not having stale variable values in the variables anymore. (also attached is a minor optimization that

Re: [HACKERS] Null pointer passed as source to memcpy() in numeric.c:make_result() and numeric:set_var_from_var()

2015-08-02 Thread Tom Lane
Piotr Stefaniak postg...@piotr-stefaniak.me writes: these two queries will make the assertions below fail: SELECT STDDEV(0.0); SELECT 0.0 * 0; Fixed, thanks. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] upgrade failure from 9.5 to head

2015-08-02 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-08-01 19:13:05 -0400, Noah Misch wrote: That's a bug. The test_ddl_deparse suite leaves a shell type, which pg_upgrade fails to reproduce. Whether to have pg_upgrade support that or just error out cleanly is another question. There seems

Re: [HACKERS] nodes/*funcs.c inconsistencies

2015-08-02 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Mon, Apr 16, 2012 at 06:25:15AM -0400, Noah Misch wrote: I observed these inconsistencies in node support functions: A fresh audit found the attached problems new in 9.5[1]. Many thanks for doing that; I'd had the same checking on my personal to-do

Re: [HACKERS] [sqlsmith] Failed assertion in joinrels.c

2015-08-02 Thread Tom Lane
Piotr Stefaniak postg...@piotr-stefaniak.me writes: On 08/01/2015 05:59 PM, Tom Lane wrote: Well, I certainly think all of these represent bugs: 1 | ERROR: could not find pathkey item to sort sqlsmith was able to find these two queries that trigger the error on my machine: Hmm ... I see

Re: [HACKERS] nodes/*funcs.c inconsistencies

2015-08-02 Thread Noah Misch
On Mon, Apr 16, 2012 at 06:25:15AM -0400, Noah Misch wrote: I observed these inconsistencies in node support functions: A fresh audit found the attached problems new in 9.5[1]. Most are cosmetic INT/UINT or field order corrections. The non-cosmetic changes involve CustomPath, CustomScan, and

Re: [HACKERS] nodes/*funcs.c inconsistencies

2015-08-02 Thread Peter Geoghegan
On Sun, Aug 2, 2015 at 1:28 PM, Noah Misch n...@leadboat.com wrote: A fresh audit found the attached problems new in 9.5[1]. Most are cosmetic INT/UINT or field order corrections. I was responsible for a couple of the cosmetic ones. Sorry about that. It occurs to me that we could do a little

Re: [HACKERS] nodes/*funcs.c inconsistencies

2015-08-02 Thread Peter Geoghegan
On Sun, Aug 2, 2015 at 3:07 PM, Peter Geoghegan p...@heroku.com wrote: I'm surprised that this stuff was only ever used for logical decoding infrastructure so far. On second thought, having tried it, one reason is that that breaks things that are considered legitimate for historical reasons.

Re: [HACKERS] upgrade failure from 9.5 to head

2015-08-02 Thread Andrew Dunstan
On 08/02/2015 04:00 PM, Tom Lane wrote: Andres Freund and...@anarazel.de writes: On 2015-08-01 19:13:05 -0400, Noah Misch wrote: That's a bug. The test_ddl_deparse suite leaves a shell type, which pg_upgrade fails to reproduce. Whether to have pg_upgrade support that or just error out

Re: [HACKERS] Sharing aggregate states between different aggregate functions

2015-08-02 Thread David Rowley
On 29 July 2015 at 03:45, Heikki Linnakangas hlinn...@iki.fi wrote: On 07/28/2015 04:14 AM, David Rowley wrote: On 27 July 2015 at 20:11, Heikki Linnakangas hlinn...@iki.fi wrote: On 07/27/2015 08:34 AM, David Rowley wrote: In this function I also wasn't quite sure if it was with comparing

Re: [HACKERS] upgrade failure from 9.5 to head

2015-08-02 Thread Andres Freund
On 2015-08-02 19:06:49 -0400, Andrew Dunstan wrote: I'm fine with fixing it, but what's the actual use case for a long lived shell type? The use-case imo is that we shouldn't just break if somebody did something stupid or was busy creating a new type while a scheduled backup ran. Andres --

Re: [HACKERS] nodes/*funcs.c inconsistencies

2015-08-02 Thread Stephen Frost
Noah, * Noah Misch (n...@leadboat.com) wrote: On Mon, Apr 16, 2012 at 06:25:15AM -0400, Noah Misch wrote: I observed these inconsistencies in node support functions: A fresh audit found the attached problems new in 9.5[1]. Most are cosmetic INT/UINT or field order corrections. The

Re: [HACKERS] nodes/*funcs.c inconsistencies

2015-08-02 Thread Kouhei Kaigai
On Mon, Apr 16, 2012 at 06:25:15AM -0400, Noah Misch wrote: I observed these inconsistencies in node support functions: A fresh audit found the attached problems new in 9.5[1]. Most are cosmetic INT/UINT or field order corrections. The non-cosmetic changes involve CustomPath, CustomScan,

Re: [HACKERS] Explanation for intermittent buildfarm pg_upgradecheck failures

2015-08-02 Thread Michael Paquier
On Mon, Aug 3, 2015 at 1:30 AM, Tom Lane t...@sss.pgh.pa.us wrote: I haven't looked to find out why the unlinks happen in this order, but on a heavily loaded machine, it's certainly possible that the process would lose the CPU after unlink(postmaster.pid), and then a new postmaster could get

Re: [HACKERS] upgrade failure from 9.5 to head

2015-08-02 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: On 2015-08-01 19:13:05 -0400, Noah Misch wrote: On Wed, Jul 29, 2015 at 04:42:55PM -0400, Andrew Dunstan wrote: The next hump is this, in restoring contrib_regression_test_ddl_parse: pg_restore: creating FUNCTION

Re: [HACKERS] nodes/*funcs.c inconsistencies

2015-08-02 Thread Noah Misch
On Mon, Aug 03, 2015 at 01:32:10AM +, Kouhei Kaigai wrote: On Mon, Apr 16, 2012 at 06:25:15AM -0400, Noah Misch wrote: I observed these inconsistencies in node support functions: A fresh audit found the attached problems new in 9.5[1]. Most are cosmetic INT/UINT or field order

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-08-02 Thread Andreas Karlsson
On 07/15/2015 09:30 PM, Robert Haas wrote: On Tue, Jul 14, 2015 at 5:57 PM, Jim Nasby jim.na...@bluetreble.com wrote: On 7/7/15 7:07 AM, Andres Freund wrote: On 2015-07-03 18:03:58 -0400, Tom Lane wrote: I have just looked through this thread, and TBH I think we should reject this patch

Re: [HACKERS] Improving test coverage of extensions with pg_dump

2015-08-02 Thread Michael Paquier
On Thu, Jul 30, 2015 at 5:35 PM, Michael Paquier michael.paqu...@gmail.com wrote: Note as well that I will be fine with any decision taken by the committer who picks up this, this test case is useful by itself in any case. And I just recalled that I actually did no tests for this thing on