[HACKERS] Equivalence Rules

2014-03-02 Thread Ali Piroozi
Hi My question is: Does PostgreSQL implements equivalence rules(from those are listed in email's attachment)? Which function or which part of source code(in PostgreSQL ) implements the equivalence rules? I think, this should be implemented in query optimization part of PostgreSQL, but which rule

Re: [HACKERS] proposal: new long psql parameter --on-error-stop

2014-03-02 Thread Pavel Stehule
2014-03-01 23:53 GMT+01:00 Fabrízio de Royes Mello fabriziome...@gmail.com : On Sat, Mar 1, 2014 at 5:37 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello here is a prototype: bash-4.1$ /usr/local/pgsql/bin/psql --help-variables List of some variables (options) for use from

Re: Fwd: [HACKERS] patch: make_timestamp function

2014-03-02 Thread Pavel Stehule
Hello updated version - a precheck is very simple, and I what I tested it is enough Regards Pavel 2014-02-28 15:11 GMT+01:00 Alvaro Herrera alvhe...@2ndquadrant.com: Pavel Stehule escribió: so still I prefer to allow numeric time zones. What I can: a) disallow numeric only

Re: [HACKERS] Equivalence Rules

2014-03-02 Thread Antonin Houska
There are 2 kinds of rules in this document: for joins and for set operations. As for joins, I think they are all about *inner* joins. Postgres (IMO) implements them by not doing anything special if query only contains inner joins. On the other hand, attention has to be paid if there's at least

Re: [HACKERS] GSoC 2014 - mentors, students and admins

2014-03-02 Thread Tan Tran
Hi Greg, pgsql-advocacy, and pgsql-hackers, I'm interested in doing my GSoC project on this idea. I'm new to indexing and WAL, which I haven't encountered in my classes, but it sounds interesting and valuable to Postgresql. So here's my draft proposal. Do you mind giving your opinion and

Re: [HACKERS] gaussian distribution pgbench

2014-03-02 Thread Fabien COELHO
Hello Alvaro Tom, Alvaro Herrera alvhe...@2ndquadrant.com writes: Seems that in the review so far, Fabien has focused mainly in the mathematical properties of the new random number generation. That seems perfectly fine, but no comment has been made about the chosen UI for the feature. Per

[HACKERS] heapgetpage() and -takenDuringRecovery

2014-03-02 Thread Andres Freund
Hi, I am currently playing around with Robert's suggestion to get rid of changeset extraction's reusage of SnapshotData fields (basically that xip contains committed, not uncommited transactions) by using NodeTag similar to many other (families of) structs. While reading around which references

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Magnus Hagander
On Sun, Mar 2, 2014 at 6:20 AM, Noah Misch n...@leadboat.com wrote: On Sat, Mar 01, 2014 at 05:51:46PM -0500, Andrew Dunstan wrote: On 03/01/2014 05:10 PM, Tom Lane wrote: One other thought here: is it actually reasonable to expend a lot of effort on the Windows case? I'm not aware that

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Stephen Frost
* Dave Page (dp...@pgadmin.org) wrote: It's not that rare in my experience - certainly there are far more single user installations, but Terminal Server configurations are common for deploying apps Citrix-style or VDI. The one and only Windows server maintained by the EDB infrastructure

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Tom Lane
Noah Misch n...@leadboat.com writes: One option that would simplify things is to fix only non-Windows in the back branches, via socket protection, and fix Windows in HEAD only. We could even do so by extending HAVE_UNIX_SOCKETS support to Windows through named pipes. +1 for that solution, if

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread james
On 02/03/2014 15:30, Magnus Hagander wrote: Terminal Services have definitely become more common over time, but with faster and cheaper virtualization, a lot of people have switched to that instead, which would remove the problem of course. I wonder how common it actually is, though, to

Re: [HACKERS] proposal, patch: allow multiple plpgsql plugins

2014-03-02 Thread Marko Tiikkaja
Hi Pavel, The extra semicolons are still in there; around line 525 in this patch. However, I removed them to compile the patch, but I can't compile my plugin on OS X. The plugin is simple, it just does: void _PG_init(void) { DirectFunctionCall1(plpgsql_register_plugin,

Re: [HACKERS] [pgsql-advocacy] GSoC 2014 - mentors, students and admins

2014-03-02 Thread Tan Tran
Earlier I posted an email to this thread that I realize hijacked the discussion. Please continue replying to here instead. On Feb 28, 2014, at 6:59 AM, Karol Trzcionka karl...@gmail.com wrote: W dniu 27.02.2014 22:25, Thom Brown pisze: On 27 February 2014 21:08, David Fetter da...@fetter.org

[HACKERS] GSoC on WAL-logging hash indexes

2014-03-02 Thread Tan Tran
Hi all, Earlier I posted this in the wrong thread. Please excuse the double posting. Tan Tran Begin forwarded message: From: Tan Tran tankimt...@gmail.com Subject: Re: [HACKERS] GSoC 2014 - mentors, students and admins Date: March 2, 2014 at 5:03:14 AM PST To: Greg Stark st...@mit.edu Cc:

Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-03-02 Thread Dean Rasheed
On 25 February 2014 12:33, Florian Pflug f...@phlo.org wrote: On Feb24, 2014, at 17:50 , Dean Rasheed dean.a.rash...@gmail.com wrote: On 20 February 2014 01:48, Florian Pflug f...@phlo.org wrote: On Jan29, 2014, at 13:45 , Florian Pflug f...@phlo.org wrote: In fact, I'm currently leaning

Re: [HACKERS] proposal, patch: allow multiple plpgsql plugins

2014-03-02 Thread Pavel Stehule
Hi 2014-03-02 19:59 GMT+01:00 Marko Tiikkaja ma...@joh.to: Hi Pavel, The extra semicolons are still in there; around line 525 in this patch. However, I removed them to compile the patch, but I can't compile my plugin on OS X. The plugin is simple, it just does: void _PG_init(void) {

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Andrew Dunstan
On 03/02/2014 01:27 PM, Tom Lane wrote: Also, to what extent does any of this affect buildfarm animals? Whatever we do for make check will presumably make those tests safe for them, but how are the postmasters they test under make installcheck set up? Nothing special. bin/initdb -U

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Stephen Frost
* james (ja...@mansionfamily.plus.com) wrote: Well, the banks I've contracted at recently are all rather keen on virtual desktops for developers, and some of those are terminal services. We're a headache, and packaging up all the things we need is a pain, so there is some mileage in buying

Re: [HACKERS] proposal, patch: allow multiple plpgsql plugins

2014-03-02 Thread Marko Tiikkaja
On 3/2/14, 8:47 PM, Pavel Stehule wrote: 2014-03-02 19:59 GMT+01:00 Marko Tiikkaja ma...@joh.to: Undefined symbols for architecture x86_64: _plpgsql_register_plugin, referenced from: __PG_init in plpgtest.o I'm guessing this is because PL/PgSQL is a shared library and not in core?

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Josh Berkus
On 03/02/2014 12:17 PM, Stephen Frost wrote: The issue here is about how much effort to go to in order to secure the PostgreSQL system that is started up to do the regression tests. It's already set up to only listen on localhost and will run with only the privileges of the user running the

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Stephen Frost
* Josh Berkus (j...@agliodbs.com) wrote: The only way I can see this being of real use to an attacker is if they could use this exploit to create a wormed version of PostgresQL on the target build system. Is that possible? I don't see why it wouldn't be- once the attacker is on the box as any

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Magnus Hagander
On Sun, Mar 2, 2014 at 7:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: Noah Misch n...@leadboat.com writes: One option that would simplify things is to fix only non-Windows in the back branches, via socket protection, and fix Windows in HEAD only. We could even do so by extending

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Noah Misch
On Sun, Mar 02, 2014 at 01:27:18PM -0500, Tom Lane wrote: Noah Misch n...@leadboat.com writes: One option that would simplify things is to fix only non-Windows in the back branches, via socket protection, and fix Windows in HEAD only. We could even do so by extending HAVE_UNIX_SOCKETS

Re: [HACKERS] Hot standby doesn't come up on some situation.

2014-03-02 Thread Kyotaro HORIGUCHI
Hello, At Fri, 28 Feb 2014 14:45:58 +0200, Heikki Linnakangas hlinnakan...@vmware.com wrote in 53108506.2010...@vmware.com Yes, but the same stuation could be made by restarting crashed secondary. Yeah. I have no idea about the scenario on whitch this behavior was regarded as

Re: [HACKERS] Hot standby doesn't come up on some situation.

2014-03-02 Thread Kyotaro HORIGUCHI
Ouch! It brought another bug. I completely understood the behavior thanks to your detailed explanation. (And how to use log messages effectively :-) Sorry, I just found that it's wrong, and found another problem brought by your patch. I agree that the fix is appropriate. I believe the

Re: [HACKERS] Hot standby doesn't come up on some situation.

2014-03-02 Thread Kyotaro HORIGUCHI
Correcting one point of my last mail. Ouch! It brought another bug. My patch also did. regards, I completely understood the behavior thanks to your detailed explanation. (And how to use log messages effectively :-) Sorry, I just found that it's wrong, and found another problem

Re: [HACKERS] Review: Patch FORCE_NULL option for copy COPY in CSV mode

2014-03-02 Thread Ian Lawrence Barwick
2014-03-02 8:26 GMT+09:00 Andrew Dunstan and...@dunslane.net: On 01/29/2014 10:59 AM, Ian Lawrence Barwick wrote: 2014/1/29 Ian Lawrence Barwick barw...@gmail.com: 2014-01-29 Andrew Dunstan and...@dunslane.net: On 01/28/2014 05:55 AM, Ian Lawrence Barwick wrote: Hi Payal Many thanks

Re: [HACKERS] Hot standby doesn't come up on some situation.

2014-03-02 Thread Kyotaro HORIGUCHI
Hello, | * as if we had just replayed the record before the REDO location | * (or the checkpoint record itself, if it's a shutdown checkpoint). The test script following raises assertion failure. It's added with 'non-shutdown' checkpoint' just before shutting down immediately. Starting

Re: [HACKERS] gaussian distribution pgbench

2014-03-02 Thread KONDO Mitsumasa
(2014/03/02 22:32), Fabien COELHO wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Seems that in the review so far, Fabien has focused mainly in the mathematical properties of the new random number generation. That seems perfectly fine, but no comment has been made about the chosen UI

Re: [HACKERS] Review: Patch FORCE_NULL option for copy COPY in CSV mode

2014-03-02 Thread Andrew Dunstan
On 03/02/2014 10:06 PM, Ian Lawrence Barwick wrote: 2014-03-02 8:26 GMT+09:00 Andrew Dunstan and...@dunslane.net: On 01/29/2014 10:59 AM, Ian Lawrence Barwick wrote: 2014/1/29 Ian Lawrence Barwick barw...@gmail.com: 2014-01-29 Andrew Dunstan and...@dunslane.net: On 01/28/2014 05:55 AM, Ian

Re: [HACKERS] proposal, patch: allow multiple plpgsql plugins

2014-03-02 Thread Pavel Stehule
Dne 2. 3. 2014 21:55 Marko Tiikkaja ma...@joh.to napsal(a): On 3/2/14, 8:47 PM, Pavel Stehule wrote: 2014-03-02 19:59 GMT+01:00 Marko Tiikkaja ma...@joh.to: Undefined symbols for architecture x86_64: _plpgsql_register_plugin, referenced from: __PG_init in plpgtest.o I'm

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Tom Lane
Noah Misch n...@leadboat.com writes: Concerning the immediate fix for non-Windows systems, does any modern system ignore modes of Unix domain sockets? It appears to be a long-fixed problem: What I was envisioning was that we'd be relying on the permissions of the containing directory to keep

Re: [HACKERS] Triggers on foreign tables

2014-03-02 Thread Ronan Dunklau
Hello. Did you have time to review the latest version of this patch ? Is there anything I can do to get this ready for commiter ? Thank you for all the work performed so far. Le mardi 4 février 2014 13:16:22 Ronan Dunklau a écrit : Le lundi 3 février 2014 23:28:45 Noah Misch a écrit : On

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: The only way I can see this being of real use to an attacker is if they could use this exploit to create a wormed version of PostgresQL on the target build system. Is that possible? It's theoretically possible, since having broken into the build user's

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-02 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Noah Misch n...@leadboat.com writes: Concerning the immediate fix for non-Windows systems, does any modern system ignore modes of Unix domain sockets? It appears to be a long-fixed problem: What I was envisioning was that we'd be relying on the

Re: [HACKERS] gaussian distribution pgbench

2014-03-02 Thread Fabien COELHO
\setrandom foo 1 10 [uniform] \setrandom foo 1 :size gaussian 3.6 \setrandom foo 1 100 exponential 7.2 It's good design. I think it will become more low overhead at part of parsing in pgbench, because comparison of strings will be redeced(maybe). And I'd like to remove [uniform],

Re: [HACKERS] proposal, patch: allow multiple plpgsql plugins

2014-03-02 Thread Pavel Stehule
2014-03-03 6:09 GMT+01:00 Pavel Stehule pavel.steh...@gmail.com: Dne 2. 3. 2014 21:55 Marko Tiikkaja ma...@joh.to napsal(a): On 3/2/14, 8:47 PM, Pavel Stehule wrote: 2014-03-02 19:59 GMT+01:00 Marko Tiikkaja ma...@joh.to: Undefined symbols for architecture x86_64: