Re: [HACKERS] [v9.4] row level security

2013-09-21 Thread Kohei KaiGai
Now I'm trying to tackle the covert-channel problem that Korotkov pointed out at upthread. The attached patch works "almost" well. It prevents to print number of rows being filtered if the target plan node is under sub-query with security-barrier attribute; because row- level security feature is c

Re: [HACKERS] Extensions makefiles - coverage

2013-09-21 Thread Peter Eisentraut
On Thu, 2013-07-25 at 17:07 +0200, Ronan Dunklau wrote: > I am using approximatively the layout that was proposed here: > http://www.postgresql.org/message-id/51bb1b6e.2070...@dunslane.net > It looks like everything is hard-coded to take the source and the > gcda, gcno files in the base directory,

Re: [HACKERS] [PATCH] Add use of asprintf()

2013-09-21 Thread Peter Eisentraut
On Tue, 2013-09-17 at 15:13 +0500, Asif Naeem wrote: > 1. It seems that you have used strdup() on multiple places in the > patch, e.g. in the below code snippet is it going to lead crash if > newp->ident is NULL because of strdup() failure ? > > static EPlan * > find_plan(char *id

Re: [HACKERS] [PATCH] Add use of asprintf()

2013-09-21 Thread Peter Eisentraut
On Mon, 2013-09-16 at 17:31 -0300, Alvaro Herrera wrote: > Looks good to me, except that pg_asprintf seems to be checking ret > instead of rc. Ah, good catch! > Is there a reason for the API discrepancy of pg_asprintf vs. psprintf? > I don't see that we use the integer return value anywhere. Cal

Re: [HACKERS] VMs for Reviewers Available

2013-09-21 Thread Andrew Dunstan
On 09/21/2013 10:48 PM, Jaime Casanova wrote: El 21/09/2013 18:09, "Andrew Dunstan" > escribió: > > > On 09/21/2013 06:48 PM, Peter Geoghegan wrote: >> >> On Sat, Sep 21, 2013 at 3:35 PM, Josh Berkus > wrote: >>> >>> Windows VMs are also

Re: [HACKERS] Assertions in PL/PgSQL

2013-09-21 Thread Jaime Casanova
El 21/09/2013 17:16, "Jaime Casanova" escribió: > > On Fri, Sep 20, 2013 at 5:17 AM, Marko Tiikkaja wrote: > > On 9/20/13 12:09 PM, Amit Khandekar wrote: > >> > >> On 16 September 2013 03:43, Marko Tiikkaja wrote: > >>> > >>> I think it would be extremely surprising if a command like that got >

Re: [HACKERS] VMs for Reviewers Available

2013-09-21 Thread Jaime Casanova
El 21/09/2013 18:09, "Andrew Dunstan" escribió: > > > On 09/21/2013 06:48 PM, Peter Geoghegan wrote: >> >> On Sat, Sep 21, 2013 at 3:35 PM, Josh Berkus wrote: >>> >>> Windows VMs are also available, but I don't have the ability to >>> preconfigure them with tools. >> >> Wasn't there an EC2 image

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-09-21 Thread Peter Geoghegan
On Sat, Sep 21, 2013 at 7:22 PM, Peter Geoghegan wrote: > So because this isn't a tuple-level lock - it's really a value-level > lock - LockTuple() is not called by the btree code at all, and so > arbitration of who gets the lock is, as I've said, essentially > undefined. Addendum: It isn't even

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-09-21 Thread Peter Geoghegan
On Fri, Sep 20, 2013 at 5:48 PM, Peter Geoghegan wrote: >> ProcLockWakeup() only wakes as many waiters from the head of the queue >> as can all be granted the lock without any conflicts. So I don't >> think there is a race condition in that path. > > Right, but what about XactLockTableWait() itse

Re: [HACKERS] logical changeset generation v6

2013-09-21 Thread Steve Singer
On 09/20/2013 06:33 AM, Andres Freund wrote: Hi, The points I find daunting are the semantics, like: * How do we control whether a standby is allowed prevent WAL file removal. What if archiving is configured? * How do we control whether a standby is allowed to peg xmin? * How long do we pe

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-09-21 Thread Peter Geoghegan
On Sun, Sep 15, 2013 at 8:23 AM, Andres Freund wrote: >> I'll find it very difficult to accept any implementation that is going >> to bloat things even worse than our upsert looping example. > > How would any even halfway sensible example cause *more* bloat than the > upsert looping thing? I was

Re: [HACKERS] VMs for Reviewers Available

2013-09-21 Thread Andrew Dunstan
On 09/21/2013 06:48 PM, Peter Geoghegan wrote: On Sat, Sep 21, 2013 at 3:35 PM, Josh Berkus wrote: Windows VMs are also available, but I don't have the ability to preconfigure them with tools. Wasn't there an EC2 image doing the rounds that Magnus created, that took care of all of that for yo

Re: [HACKERS] VMs for Reviewers Available

2013-09-21 Thread Peter Geoghegan
On Sat, Sep 21, 2013 at 3:35 PM, Josh Berkus wrote: > Windows VMs are also available, but I don't have the ability to > preconfigure them with tools. Wasn't there an EC2 image doing the rounds that Magnus created, that took care of all of that for you? http://blog.hagander.net/archives/151-Testi

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-09-21 Thread Peter Geoghegan
Hi Stephen, On Fri, Sep 20, 2013 at 6:55 PM, Stephen Frost wrote: > I'm not sure I follow this completely- you're saying that a definition > of 'upsert' which includes having to lock rows which aren't in your > current snapshot (for reasons stated) isn't a useful one. Is the > implication that a

Re: [HACKERS] VMs for Reviewers Available

2013-09-21 Thread Josh Berkus
> 3. Preference for CentOS or Ubuntu. Windows VMs are also available, but I don't have the ability to preconfigure them with tools. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subsc

Re: [HACKERS] UTF8 national character data type support WIP patch and list of open issues.

2013-09-21 Thread Tatsuo Ishii
> I think the point here is that, at least as I understand it, encoding > conversion and sanitization happens at a very early stage right now, > when we first receive the input from the client. If the user sends a > string of bytes as part of a query or bind placeholder that's not > valid in the da

Re: [HACKERS] Assertions in PL/PgSQL

2013-09-21 Thread Jaime Casanova
On Fri, Sep 20, 2013 at 5:17 AM, Marko Tiikkaja wrote: > On 9/20/13 12:09 PM, Amit Khandekar wrote: >> >> On 16 September 2013 03:43, Marko Tiikkaja wrote: >>> >>> I think it would be extremely surprising if a command like that got >>> optimized away based on a GUC, so I don't think that would be

Re: [HACKERS] Assertions in PL/PgSQL

2013-09-21 Thread Jim Nasby
On 9/19/13 7:08 AM, Pavel Stehule wrote: FWIW, we've written a framework (currently available in the EnovaTools project on pgFoundry) that allows for very, very fine-grain control over asserts. - Every assert has a name (and an optional sub-name) as well as a level - You can global

Re: [HACKERS] SSI freezing bug

2013-09-21 Thread Hannu Krosing
On 09/21/2013 10:46 PM, Andres Freund wrote: > > Heikki Linnakangas schrieb: >> Kevin Grittner wrote: >>> Andres Freund wrote: > On 2013-09-20 13:55:36 +0300, Heikki Linnakangas wrote: >> When a tuple is predicate-locked, the key of the lock is >> ctid+xmin. >> However, when a tuple

Re: [HACKERS] SSI freezing bug

2013-09-21 Thread Andres Freund
Heikki Linnakangas schrieb: >Kevin Grittner wrote: >>Andres Freund wrote: On 2013-09-20 13:55:36 +0300, Heikki Linnakangas wrote: > When a tuple is predicate-locked, the key of the lock is >ctid+xmin. > However, when a tuple is frozen, its xmin is changed to FrozenXid. >>That

Re: [HACKERS] SSI freezing bug

2013-09-21 Thread Heikki Linnakangas
Kevin Grittner wrote: >Andres Freund wrote: >>> On 2013-09-20 13:55:36 +0300, Heikki Linnakangas wrote: When a tuple is predicate-locked, the key of the lock is ctid+xmin. However, when a tuple is frozen, its xmin is changed to FrozenXid. >That effectively invalidates any pred

Re: [HACKERS] pgbench progress report improvements

2013-09-21 Thread Noah Misch
On Sat, Sep 21, 2013 at 10:55:54AM +0200, Fabien COELHO wrote: >>> Improve pgbench measurements & progress report >> >> These changes are loosely coupled; please separate them into several patch >> files: > > I thought about this. I submitted a bunch of very small pgbench patches > to the previous

[HACKERS] VMs for Reviewers Available

2013-09-21 Thread Josh Berkus
Folks, In order to make sure that nobody is prevented from reviewing due to not having a suitable development environment available, the PostgreSQL community is offering free virtual machines for reviewing and testing patches for this CommitFest. If you want a VM for this purpose, please email me

Re: [HACKERS] pgbench progress report improvements

2013-09-21 Thread Fabien COELHO
Moreover, using 'xxx=figure" breaks simple "cut" pipelining to extract the figures, so I would prefer to stick to spaces. Maybe: progress: 36.0 s, 115.2 tps, lat avg 9.678 ms stddev 1.792, lag 0.143 ms but I liked my "+-" approach:-) 100 +- 3 implies a range of 97 to 103 and no values are

Re: [HACKERS] pgbench progress report improvements

2013-09-21 Thread Rod Taylor
On Sat, Sep 21, 2013 at 4:55 AM, Fabien COELHO wrote: > > > I suggest getting the term "stddev" in there somehow, maybe like this: >> >> progress: 37.0 s, 115.2 tps, latency avg=8.678 ms stddev=1.792 >> > > My issue is to try to keep the line width under control so as to avoid > line breaks in

Re: [HACKERS] pgbench progress report improvements

2013-09-21 Thread Fabien COELHO
Hello Noah, Thanks a lot for all these comments! I'm not planning to apply all of them directly, especially removing features that I think really desirable. Please find a defense against some of your suggestions. I wish to wait for some more feedback about these arguments before spending tim

Re: [HACKERS] Minor inheritance/check bug: Inconsistent behavior

2013-09-21 Thread Amit Kapila
On Fri, Sep 20, 2013 at 7:17 PM, Robert Haas wrote: > On Fri, Sep 20, 2013 at 9:43 AM, Amit Kapila wrote: >>Handling for OID is not clear, shall we allow it or not in check >> constraint? >>In my current patch OID will not be allowed in check constraint. > > I vote for allowing it. I ha