Re: [HACKERS] Streaming replication, some small issues

2009-12-11 Thread Fujii Masao
On Tue, Dec 8, 2009 at 5:30 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: - If a WAL file is not found in the master for some reason, standby goes into an infinite loop retrying it: ERROR:  could not read xlog records: FATAL:  could not open file

Re: [HACKERS] Largeobject Access Controls (r2460)

2009-12-11 Thread Takahiro Itagaki
KaiGai Kohei kai...@ak.jp.nec.com wrote: We have to reference pg_largeobject_metadata to check whether a certain large objct exists, or not. It is a case when we create a new large object, but write nothing. OK, that makes sense. In addition of the patch, we also need to fix

Re: [HACKERS] Largeobject Access Controls (r2460)

2009-12-11 Thread Takahiro Itagaki
Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: In addition of the patch, we also need to fix pg_restore with --clean option. I added DropBlobIfExists() in pg_backup_db.c. A revised patch attached. Please check further mistakes. ...and here is an additional fix for contrib modules.

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread KaiGai Kohei
Stephen Frost wrote: * Greg Smith (g...@2ndquadrant.com) wrote: I personally feel that Steven Frost's recent comments here about how the PostgreSQL code makes this harder than it should be really cuts to the core of a next step here. The problem facing us isn't is SEPostgreSQL the

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Magnus Hagander
On Fri, Dec 11, 2009 at 05:45, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Dec 10, 2009 at 5:08 PM, Tom Lane t...@sss.pgh.pa.us wrote: My guess is that a credible SEPostgres offering will require a long-term amount of work at least equal to, and very

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: It's been perfectly clear since day one, and was reiterated as recently as today http://archives.postgresql.org/message-id/4b21757e.7090...@2ndquadrant.com that what the security community wants is row-level security. Yes, they do want row-level

Re: [HACKERS] navigation menu for documents

2009-12-11 Thread Andrew Dunstan
Richard Huxton wrote: Reworked jquery-based document menu is attached. Untar will produce bin/ and html/ cd .../html cp /path/to/htmldocs/* . ../bin/add_js.pl *html The contents should be on almost all relevant pages, and: - tested on FF3.5, IE7, Opera 9.x - expanded if screen width 800px,

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 4:31 AM, Magnus Hagander mag...@hagander.net wrote: On Fri, Dec 11, 2009 at 05:45, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Dec 10, 2009 at 5:08 PM, Tom Lane t...@sss.pgh.pa.us wrote: My guess is that a credible SEPostgres

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread Stephen Frost
KaiGai, * KaiGai Kohei (kai...@ak.jp.nec.com) wrote: (1) Whether the framework should host the default PG model, not only enhanced security features, or not? This patch tried to host both of the default PG model and SELinux. But, the default PG model does not have same origin with

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Bernd Helmle
--On 10. Dezember 2009 23:55:49 -0500 Robert Haas robertmh...@gmail.com wrote: If there's some real-world test where this probe costs 0.3%-0.4%, I think that is sufficient grounds for rejecting this patch. I understand the desire of people to be able to use dtrace, but our performance is

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Alvaro Herrera
Bernd Helmle escribió: I repeated the pgbench runs per Greg's advice (see upthread) and it seems there is actually a small slowdown which supports this argument, unfortunately. After repeating the pgbench runs with and without the new probes (note: i've used the new version of the patch,

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Robert Haas
2009/12/11 KaiGai Kohei kai...@ak.jp.nec.com: It tried to provide a set of comprehensive entry points to replace existing PG checks at once. However, the SE-PgSQL/Lite patch covers accesses on only database, schema, tables and columns. Is it necessary to be comprehensive from the beginning?

Re: [HACKERS] thread safety on clients

2009-12-11 Thread Alvaro Herrera
Jaime Casanova wrote: On Thu, Dec 10, 2009 at 11:33 PM, Jaime Casanova jcasa...@systemguards.com.ec wrote: On Thu, Dec 10, 2009 at 11:22 PM, Tom Lane t...@sss.pgh.pa.us wrote: My bet is that the real problem was a build inconsistency in the backend.  Does make distclean and rebuild make

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Joshua Brindle
Stephen Frost wrote: Tom, snip The proposals to make SEPostgres drive regular SQL permissions never came out of anyone from that side, they were proposed by PG people looking for a manageable first step. I do not believe this to be accurate. Josh, were you able to find any public

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Smalley
On Fri, 2009-12-11 at 09:20 -0500, Robert Haas wrote: On Fri, Dec 11, 2009 at 4:31 AM, Magnus Hagander mag...@hagander.net wrote: On Fri, Dec 11, 2009 at 05:45, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Dec 10, 2009 at 5:08 PM, Tom Lane

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread Greg Smith
Robert Haas wrote: One comment I have in general about this process is that I think it would enormously reduce the level of pain associated with making these kinds of changes if we could get patches that were not full of minor issues that need to be cleaned up (like comments not properly

Re: [HACKERS] thread safety on clients

2009-12-11 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Yes, but what if you test with the broken pgbench? As Tom says, it should not be able to crash the backend no matter what it does. The crash is real --- I've replicated it here. Still trying to figure out what is the real cause.

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread KaiGai Kohei
Stephen Frost wrote: KaiGai, * KaiGai Kohei (kai...@ak.jp.nec.com) wrote: (1) Whether the framework should host the default PG model, not only enhanced security features, or not? This patch tried to host both of the default PG model and SELinux. But, the default PG model does not

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread David P. Quigley
On Fri, 2009-12-11 at 09:32 -0500, Robert Haas wrote: 2009/12/11 KaiGai Kohei kai...@ak.jp.nec.com: It tried to provide a set of comprehensive entry points to replace existing PG checks at once. However, the SE-PgSQL/Lite patch covers accesses on only database, schema, tables and columns.

Re: [HACKERS] thread safety on clients

2009-12-11 Thread Marko Kreen
On 12/11/09, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@commandprompt.com writes: Yes, but what if you test with the broken pgbench? As Tom says, it should not be able to crash the backend no matter what it does. The crash is real --- I've replicated it here. Still

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread Joshua Brindle
Greg Smith wrote: It's funny; we started out this CommitFest with me scrambling to find someone, anyone, willing to review the latest SE-PostgreSQL patch, knowing it was a big job and few were likely to volunteer. Then schedules lined up just right, and last night I managed to get a great group

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
Magnus, * Magnus Hagander (mag...@hagander.net) wrote: On Fri, Dec 11, 2009 at 05:45, Tom Lane t...@sss.pgh.pa.us wrote: It's been perfectly clear since day one, and was reiterated as recently as today http://archives.postgresql.org/message-id/4b21757e.7090...@2ndquadrant.com that what

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread David P. Quigley
On Fri, 2009-12-11 at 08:56 -0500, Stephen Frost wrote: [snip...] I do assume we're going to do row level security, but I do not feel that we need to particularly put one in front of the other. I also feel that SEPG will be valuable even without row-level security. One of the realms that we

Re: [HACKERS] Largeobject Access Controls (r2460)

2009-12-11 Thread Bruce Momjian
KaiGai Kohei wrote: Takahiro Itagaki wrote: KaiGai Kohei kai...@ak.jp.nec.com wrote: Tom Lane wrote: Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: structnamepg_largeobject/structname should not be readable by the public, since the catalog contains data in large

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Bernd Helmle
--On 11. Dezember 2009 11:28:54 -0300 Alvaro Herrera alvhe...@commandprompt.com wrote: without compiled probes: AVG(2531.68) with compiled probes: AVG(2511.97) Were the probes enabled? Hmm, they were just compiled in, i didn't anything to instrument them with dtrace. I've just

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
David, * David P. Quigley (dpqu...@tycho.nsa.gov) wrote: So I downloaded and read through the PCI DSS document (74 pages is pretty light compared to NFSv4.1 hehe...) and There are several areas there where I think strong access controls in the database will not only fulfill the requirement

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
* David P. Quigley (dpqu...@tycho.nsa.gov) wrote: On Fri, 2009-12-11 at 09:32 -0500, Robert Haas wrote: I think that we should try to move the PG default checks inside the hook functions. If we can't do that cleanly, it's a good sign that the hook functions are not correctly placed to

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 10:07 AM, David P. Quigley dpqu...@tycho.nsa.gov wrote: On Fri, 2009-12-11 at 09:32 -0500, Robert Haas wrote: 2009/12/11 KaiGai Kohei kai...@ak.jp.nec.com: It tried to provide a set of comprehensive entry points to replace existing PG checks at once. However, the

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread Joshua Brindle
Joshua Brindle wrote: Greg Smith wrote: It's funny; we started out this CommitFest with me scrambling to find someone, anyone, willing to review the latest SE-PostgreSQL patch, knowing it was a big job and few were likely to volunteer. Then schedules lined up just right, and last night I

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread Stephen Frost
KaiGai, * KaiGai Kohei (kai...@kaigai.gr.jp) wrote: As Rober Haas already suggested in another message, my patch in the last commit fest is too large. It tried to rework anything in a single patch. The per-object-type basis make sense for me. Agreed. In my cosmetic preference, ace_ is

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread Stephen Frost
Greg, * Greg Smith (g...@2ndquadrant.com) wrote: I think we need a two pronged attack on this issue. Eventually I think someone who wants this feature in there will need to sponsor someone (and not even necessarily a coder) to do a sizable round of plain old wording cleanup on the

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: I'll stop here because I see that Stephen Frost has just sent an insightful email on this topic as well. Hmm, maybe that's the Steve you were referring to. I have doubts- but then I don't ever see my comments as insightful for some reason. ;)

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-11 Thread Euler Taveira de Oliveira
Robert Haas escreveu: On Thu, Dec 10, 2009 at 9:35 PM, Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: Anyway, a revised patch according to the comments is attached. The new text format is: Buffers: shared hit=675 read=968, temp read=1443 written=1443 * Zero values are omitted.

Re: [HACKERS] Largeobject Access Controls (r2460)

2009-12-11 Thread Bruce Momjian
KaiGai Kohei wrote: We use SELECT loid FROM pg_largeobject LIMIT 1 in pg_dump. We could replace pg_largeobject_metadata instead if we try to fix only pg_dump, but it's no wonder that any other user applications use such queries. I think to allow reading loid is a balanced solution.

Re: [HACKERS] Largeobject Access Controls (r2460)

2009-12-11 Thread KaiGai Kohei
Bruce Momjian さんは書きました: KaiGai Kohei wrote: Takahiro Itagaki wrote: KaiGai Kohei kai...@ak.jp.nec.com wrote: Tom Lane wrote: Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: structnamepg_largeobject/structname should not be readable by the public, since the catalog contains

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 10:07 AM, David P. Quigley dpqu...@tycho.nsa.gov wrote: The main concern I hear is that people are worried that this is an SELinux specific design. I heard at the meeting on Wednesday that the Trusted Extensions people looked at the framework and said it meets their

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread David P. Quigley
On Fri, 2009-12-11 at 11:28 -0500, Stephen Frost wrote: [snip...] The main concern I hear is that people are worried that this is an SELinux specific design. I heard at the meeting on Wednesday that the Trusted Extensions people looked at the framework and said it meets their needs as

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread David P. Quigley
On Fri, 2009-12-11 at 11:16 -0500, Stephen Frost wrote: David, * David P. Quigley (dpqu...@tycho.nsa.gov) wrote: So I downloaded and read through the PCI DSS document (74 pages is pretty light compared to NFSv4.1 hehe...) and There are several areas there where I think strong access

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Zdenek Kotala
Bernd Helmle píše v pá 11. 12. 2009 v 17:13 +0100: --On 11. Dezember 2009 11:28:54 -0300 Alvaro Herrera alvhe...@commandprompt.com wrote: without compiled probes: AVG(2531.68) with compiled probes: AVG(2511.97) Were the probes enabled? Hmm, they were just compiled in, i didn't

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread David P. Quigley
On Fri, 2009-12-11 at 11:36 -0500, Stephen Frost wrote: [Snip...] In addition, OS allows to choose one enhanced security at most eventually. In my image, the hook should be as: Value * ac_database_create([arguments ...]) { /* * The default PG checks here.

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 12:55 PM, Zdenek Kotala zdenek.kot...@sun.com wrote: Bernd Helmle píše v pá 11. 12. 2009 v 17:13 +0100: --On 11. Dezember 2009 11:28:54 -0300 Alvaro Herrera alvhe...@commandprompt.com wrote: without compiled probes: AVG(2531.68) with compiled probes: AVG(2511.97)

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Zdenek Kotala
Robert Haas píše v čt 10. 12. 2009 v 23:55 -0500: On Wed, Dec 9, 2009 at 9:04 AM, Zdenek Kotala zdenek.kot...@sun.com wrote: But in normal situation database does also other thing and palloc is only one part of code path. It is why I run second test and use sun studio profiling tools

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Zdenek Kotala
Robert Haas píše v pá 11. 12. 2009 v 12:55 -0500: On Fri, Dec 11, 2009 at 12:55 PM, Zdenek Kotala zdenek.kot...@sun.com wrote: Bernd Helmle píše v pá 11. 12. 2009 v 17:13 +0100: --On 11. Dezember 2009 11:28:54 -0300 Alvaro Herrera alvhe...@commandprompt.com wrote: without compiled

Re: [HACKERS] Python 3.1 support

2009-12-11 Thread Joshua D. Drake
On Fri, 2009-12-11 at 01:19 +0200, Peter Eisentraut wrote: On tor, 2009-11-12 at 16:06 -0500, Tom Lane wrote: There was considerable debate earlier about whether we wanted to treat Python 3 as a separate PL so it could be available in parallel with plpython 2, because of the user-level

Re: [HACKERS] thread safety on clients

2009-12-11 Thread Tom Lane
I wrote: The crash is real --- I've replicated it here. Still trying to figure out what is the real cause. Okay, I've sussed it. The crash itself is due to a memory management mistake in the recently-rewritten EvalPlanQual code (pfree'ing a tuple that we still have live Datum references to).

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 1:04 PM, Zdenek Kotala zdenek.kot...@sun.com wrote: We know that performance impact is less then 1% probably less then 0.6%. The question is if it is acceptable or not. I personally think that it is acceptable. However if not, I will start work on backup solution with

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread David P. Quigley
On Fri, 2009-12-11 at 11:30 -0500, Robert Haas wrote: [snip...] I'll stop here because I see that Stephen Frost has just sent an insightful email on this topic as well. Hmm, maybe that's the Steve you were referring to. ...Robert Yea I never asked Stephen if he goes by Stephen or Steve

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread Joshua Brindle
Stephen Frost wrote: KaiGai, snip I do think that, technically, there's no reason we couldn't allow for multiple only-more-restrictive models to be enabled and built in a single binary for systems which support it. As such, I would make those just #if defined() rather than #elif. Let it be

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: I actually have an idea how to solve the problem in this particular case, but I'm reluctant to say what it is because I'm not sure if I'm right, and at any rate *I don't want to write this patch*. As far as crap goes, I'd have to put this

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: As far as I am concerned that is way too much, particularly considering that your test case isn't designed to be particularly memory-allocation intensive, and if it is up to me I will reject this. Even a quarter-percent slowdown for a feature that

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
All, * Robert Haas (robertmh...@gmail.com) wrote: If we design a security abstraction layer, the interfaces need to really be abstraction boundaries. Passing the table OID and then also the tablespace OID because PG DAC needs that to make its access control decision is crap. Now, to

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I thought we had an idea of using the AllocSet dispatch mechanism to make this zero-overhead in the case where the probes are not enabled. What happened to that notion? I must have missed that discussion, but +1 --- should be possible to get to

Re: [HACKERS] thread safety on clients

2009-12-11 Thread Greg Smith
Tom Lane wrote: Also, the reason why Bruce's mistake exposed this is interesting. Omitting the #define for ENABLE_THREAD_SAFETY does not actually break pgbench -j at all -- it has a fallback strategy that uses multiple subprocesses instead of multiple threads. However, it has only one srandom()

Re: [HACKERS] thread safety on clients

2009-12-11 Thread Tom Lane
Greg Smith g...@2ndquadrant.com writes: It sounds like random pgbench run for a while would certainly expose the same thing you're concerned about eventually. Yeah. Actually the odd thing about it is that the crash seemed to invariably be on conflicting pgbench_accounts updates, which is a

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Zdenek Kotala
Tom Lane píše v pá 11. 12. 2009 v 13:56 -0500: Robert Haas robertmh...@gmail.com writes: As far as I am concerned that is way too much, particularly considering that your test case isn't designed to be particularly memory-allocation intensive, and if it is up to me I will reject this.

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 1:52 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: I actually have an idea how to solve the problem in this particular case, but I'm reluctant to say what it is because I'm not sure if I'm right, and at any rate *I don't want

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Zdenek Kotala
Tom Lane píše v pá 11. 12. 2009 v 14:38 -0500: Robert Haas robertmh...@gmail.com writes: I thought we had an idea of using the AllocSet dispatch mechanism to make this zero-overhead in the case where the probes are not enabled. What happened to that notion? I must have missed that

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
David, * David P. Quigley (dpqu...@tycho.nsa.gov) wrote: So the document I read is linked below [1]. Great, thanks again. [agree with all the rest] It is definitely good to have a second opinion on this since I've just only started reading the PCI compliance documents. I'm definitely not an

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
* David P. Quigley (dpqu...@tycho.nsa.gov) wrote: Yea I never asked Stephen if he goes by Stephen or Steve when I met him on Wednesday. I guess calling him Steve is me being a bit presumptuous :) Oh, either is fine, tho people will probably follow a bit better if you say Stephen. As a

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Tom Lane
Zdenek Kotala zdenek.kot...@sun.com writes: I thought about it. I think we can use GUC variable (e.g. dtraced_alloc) and hook switch pointers to dtraced AsetFunctions. The problem is how to distribute to all backend. You set the GUC in postgresql.conf. No big deal. If we go this route it

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread Stephen Frost
Josh, * Joshua Brindle (met...@manicmethod.com) wrote: Stephen Frost wrote: I do think that, technically, there's no reason we couldn't allow for multiple only-more-restrictive models to be enabled and built in a single binary for systems which support it. As such, I would make those just

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 2:11 PM, Stephen Frost sfr...@snowman.net wrote: Second, the information we *don't* have from above is generally information about what the requesting action is.  For example, when changing ownership of an object, we can't possibly use introspection to find out the role

Re: [HACKERS] thread safety on clients

2009-12-11 Thread Tom Lane
I wrote: ... What I would have expected is crashes on the very similar updates to pgbench_branches, which is designed to be high-contention. It might be that there is some other effect going on here that explains why that wasn't happening. Need to go back and look more closely. ... and the

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Zdenek Kotala
Tom Lane píše v pá 11. 12. 2009 v 15:11 -0500: Zdenek Kotala zdenek.kot...@sun.com writes: I thought about it. I think we can use GUC variable (e.g. dtraced_alloc) and hook switch pointers to dtraced AsetFunctions. The problem is how to distribute to all backend. You set the GUC in

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Smalley
On Fri, 2009-12-11 at 14:11 -0500, Stephen Frost wrote: All, * Robert Haas (robertmh...@gmail.com) wrote: If we design a security abstraction layer, the interfaces need to really be abstraction boundaries. Passing the table OID and then also the tablespace OID because PG DAC needs that

Re: [HACKERS] random() in multi-threaded pgbench

2009-12-11 Thread Tom Lane
Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: While testing the pgbench setshell command patch with -j option, I found all threads use the same sequence of random value. Were they actually threads, or were you testing the code while it had the broken configure script that didn't set

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: OK, it's clear that I've handled this badly. Sorry. My fear (however unjustified) was that someone would go and rewrite the patch based on an opinion that I express whether they agree with it or not. That's always going to be a risk in an

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Tom Lane
Zdenek Kotala zdenek.kot...@sun.com writes: Tom Lane píše v pá 11. 12. 2009 v 15:11 -0500: If we go this route it would be nice to think about making a facility that has some usefulness for non-DTrace platforms too. Do you mean general facility for switching memory allocator? No, I was

Re: [HACKERS] random() in multi-threaded pgbench

2009-12-11 Thread Tom Lane
I wrote: Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: http://www.kernel.org/doc/man-pages/online/pages/man3/random_r.3.html It only says that you need those if you want an *independent* random sequence for each thread. pgbench never had that before and I doubt we need it now. In

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Fri, Dec 11, 2009 at 2:11 PM, Stephen Frost sfr...@snowman.net wrote: Second, the information we *don't* have from above is generally information about what the requesting action is.  For example, when changing ownership of an object, we can't

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread Robert Treat
On Thursday 10 December 2009 21:47:18 KaiGai Kohei wrote: Greg Smith wrote: It's funny; we started out this CommitFest with me scrambling to find someone, anyone, willing to review the latest SE-PostgreSQL patch, knowing it was a big job and few were likely to volunteer. Then schedules

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
Stephen (great name!), * Stephen Smalley (s...@tycho.nsa.gov) wrote: Reference: http://www.usenix.org/event/sec02/wright.html http://lxr.linux.no/#linux+v2.6.32/include/linux/security.h The XACE framework for the X server is described by:

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 3:28 PM, Stephen Frost sfr...@snowman.net wrote: I sincerely hope that even if you suggest an approach down the road unrelated to this on some other patch you're reviewing, and then you see the results and say whoah, that's horrible, and should never be committed, that

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 4:26 PM, Stephen Frost sfr...@snowman.net wrote: Hrm, I thought I had given a specific example.  Didn't do a good job of it, apparently.  Let me try to be a bit more clear: ALTER TABLE x OWNER TO y; If given the table OID, there's a ton of information we can then pull

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: If I don't tell you how to write the patch, you can't accuse me of moving the goalposts (of course I've now discovered the pitfalls of that approach as well...). Indeed, we also yell and scream when we don't know which direction the goalposts are

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Fri, Dec 11, 2009 at 4:26 PM, Stephen Frost sfr...@snowman.net wrote: Does that help clarify my example case? That case doesn't seem terribly problematic to me. It seems clear that we'll want to pass some information about both x and y. What

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Greg Smith
Stephen Frost wrote: I agree with this- one issue is, unfortunately, an overabundance from KaiGai of code-writing man-power. This is an odd situation for this community, in general, so we're having a hard time coming to grasp with it. There are plenty of parallels to when Zdenek was writing a

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Greg Smith
Tom Lane wrote: It's amazing to me that we've never gone back and improved on the original quick-and-dirty MemoryContextStats mechanism. I certainly find myself using that a lot for issues like tracking down memory leaks. That code hasn't really gone anywhere since Neil tweaked the indentation

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Greg Smith
I just did a round of integrating some of the big-picture feedback that has shown up here since the meeting into http://wiki.postgresql.org/wiki/SEPostgreSQL_Review_at_the_BWPUG , mainly supplementing the references in the Works outside of SELinux section with the new suggested reading here

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 5:36 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: On Fri, Dec 11, 2009 at 4:26 PM, Stephen Frost sfr...@snowman.net wrote: Does that help clarify my example case? That case doesn't seem terribly problematic to me.  It seems

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread KaiGai Kohei
Stephen Frost wrote: In my cosmetic preference, ace_ is better than ac_. The 'e' means extendable, and ace feels like something cool. :-) No complaints here.. I just hope this doesn't end up being *exactly* the same as your original PGACE patches.. I'd feel terrible if we weren't able to

Re: [HACKERS] SE-PostgreSQL/Lite Review

2009-12-11 Thread KaiGai Kohei
Stephen Frost wrote: Josh, * Joshua Brindle (met...@manicmethod.com) wrote: Stephen Frost wrote: I do think that, technically, there's no reason we couldn't allow for multiple only-more-restrictive models to be enabled and built in a single binary for systems which support it. As such, I

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: What exactly do you mean by a SubOID? I'm not really following that part. I assume he's talking about the object reference representation used in pg_depend, which is actually class OID + object OID + sub-object ID. The only object type that has

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread KaiGai Kohei
Robert Haas wrote: On Fri, Dec 11, 2009 at 4:26 PM, Stephen Frost sfr...@snowman.net wrote: Hrm, I thought I had given a specific example. Didn't do a good job of it, apparently. Let me try to be a bit more clear: ALTER TABLE x OWNER TO y; If given the table OID, there's a ton of

[HACKERS] status update on Hot Standby and Streaming Replication

2009-12-11 Thread Robert Haas
I'm not quite sure where we stand with these two patches. My impression is that many of the outstanding TODO items in Hot Standby have been fixed, and I'm not sure what remains. Streaming Replication I think reviewing is not as far advanced, but I'm not sure. Any chance that Hot Standby can get

Re: [HACKERS] LDAP where DN does not include UID attribute

2009-12-11 Thread Robert Haas
On Sun, Dec 6, 2009 at 11:29 PM, Greg Smith g...@2ndquadrant.com wrote: Magnus Hagander wrote: On Sun, Nov 29, 2009 at 13:05, Magnus Hagander mag...@hagander.net wrote: I'll be happy to work on this to get it ready for commit, or do you want to do the updates? Here's a patch with my work

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Bruce Momjian
Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: Unlike Tom (I think), I do believe that there is demand (possibly only from a limited number of people, but demand all the same) for this feature. Please note that I do not think there is *zero* demand for the feature. There is

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 3:50 PM, Tom Lane t...@sss.pgh.pa.us wrote: Zdenek Kotala zdenek.kot...@sun.com writes: Tom Lane píše v pá 11. 12. 2009 v 15:11 -0500: If we go this route it would be nice to think about making a facility that has some usefulness for non-DTrace platforms too. Do you

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 8:41 PM, Bruce Momjian br...@momjian.us wrote: I am not replying to many of these emails so I don't appear to be brow-beating (forcing) the community into accepting this features.  I might be brow-beating the community, but I don't want to _appear_ to be brow-beating.  

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Bruce Momjian
Ron Mayer wrote: Bruce Momjian wrote: Well, the bottom line is that this effort should grow the development and user community of Postgres --- it if doesn't, it is a failure. Really? Even if it only allows existing Postgres users and companies to expand their use into higher security

Re: [HACKERS] Adding support for SE-Linux security

2009-12-11 Thread Ron Mayer
Bruce Momjian wrote: Well, the bottom line is that this effort should grow the development and user community of Postgres --- it if doesn't, it is a failure. Really? Even if it only allows existing Postgres users and companies to expand their use into higher security applications IMHO it's a

Re: [HACKERS] Need a mentor, and a project.

2009-12-11 Thread Ashish
I am thinking about starting with the following TODO item: -- Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage. I picked this because it is somewhat related to query processing which is what I am most interested in. It also

Re: [HACKERS] Need a mentor, and a project.

2009-12-11 Thread Bruce Momjian
Ashish wrote: I am thinking about starting with the following TODO item: -- Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage. I picked this because it is somewhat related to query processing which is what I am most

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 11:36 AM, Euler Taveira de Oliveira eu...@timbira.com wrote: Robert Haas escreveu: On Thu, Dec 10, 2009 at 9:35 PM, Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: Anyway, a revised patch according to the comments is attached. The new text format is:  Buffers:

Re: [HACKERS] [PATCH] dtrace probes for memory manager

2009-12-11 Thread Tom Lane
Greg Smith g...@2ndquadrant.com writes: Tom Lane wrote: It's amazing to me that we've never gone back and improved on the original quick-and-dirty MemoryContextStats mechanism. That code hasn't really gone anywhere since Neil tweaked the indentation two years ago. What sorts of

Re: [HACKERS] Need a mentor, and a project.

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 9:00 PM, Ashish abin...@u.washington.edu wrote: I am thinking about starting with the following TODO item: -- Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage. I picked this because it is somewhat

Re: [HACKERS] Need a mentor, and a project.

2009-12-11 Thread Robert Haas
On Fri, Dec 11, 2009 at 9:05 PM, Bruce Momjian br...@momjian.us wrote: Ashish wrote: I am thinking about starting with the following TODO item: -- Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage. I picked this because it

Re: [HACKERS] status update on Hot Standby and Streaming Replication

2009-12-11 Thread Simon Riggs
On Fri, 2009-12-11 at 20:38 -0500, Robert Haas wrote: I'm not quite sure where we stand with these two patches. My impression is that many of the outstanding TODO items in Hot Standby have been fixed, and I'm not sure what remains. Streaming Replication I think reviewing is not as far

Re: [HACKERS] Need a mentor, and a project.

2009-12-11 Thread Bruce Momjian
Robert Haas wrote: On Fri, Dec 11, 2009 at 9:05 PM, Bruce Momjian br...@momjian.us wrote: Ashish wrote: I am thinking about starting with the following TODO item: -- Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage.

Re: [HACKERS] Need a mentor, and a project.

2009-12-11 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Ashish wrote: I am thinking about starting with the following TODO item: -- Have EXPLAIN ANALYZE issue NOTICE messages when the estimated and actual row counts differ by a specified percentage. I even have a sample patch you can use as a start,

  1   2   >