Re: [HACKERS] Row-Level Security

2009-12-13 Thread KaiGai Kohei
(2009/12/13 12:18), Robert Haas wrote: On Sat, Dec 12, 2009 at 7:41 PM, Josh Berkusj...@agliodbs.com wrote: Stephen, Please comment, update the wiki, let us know you're interested in this.. I blogged about this some time ago. One issue I can see is that I believe that the RLS which many

[HACKERS] [PATCH] ACE Framework - Database, Schema

2009-12-13 Thread KaiGai Kohei
Stephen, The attached two patches are the first pieces of split out from the previous large access control reworks patch. The pgsql-ace-01-database-8.5devel-r2475.patch contains nigh security hooks related to global initialization and databases. The pgsql-ace-02-schema-8.5devel-r2475.patch

Re: [HACKERS] Winflex

2009-12-13 Thread Dave Page
On Sun, Dec 13, 2009 at 5:42 AM, Andrew Dunstan and...@dunslane.net wrote: Yes. I spent a few cents and a few hours wrestling with it. AFAICT your are hosed on 64bit Windows. I can't get flex built and Cygwin is behaving very oddly. There are indications that the problem could be fairly deep -

Re: [HACKERS] Winflex

2009-12-13 Thread Magnus Hagander
On Sun, Dec 13, 2009 at 11:36, Dave Page dp...@pgadmin.org wrote: On Sun, Dec 13, 2009 at 5:42 AM, Andrew Dunstan and...@dunslane.net wrote: Yes. I spent a few cents and a few hours wrestling with it. AFAICT your are hosed on 64bit Windows. I can't get flex built and Cygwin is behaving very

Re: [HACKERS] Row-Level Security

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 3:50 AM, KaiGai Kohei kai...@kaigai.gr.jp wrote: (2009/12/13 12:18), Robert Haas wrote: On Sat, Dec 12, 2009 at 7:41 PM, Josh Berkusj...@agliodbs.com  wrote: I blogged about this some time ago.  One issue I can see is that I believe that the RLS which many users want is

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

2009-12-13 Thread Stephen Frost
* 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. ;-) My apologies if I come

Re: [HACKERS] [PATCH] ACE Framework - Database, Schema

2009-12-13 Thread Robert Haas
2009/12/13 KaiGai Kohei kai...@kaigai.gr.jp: The previous patch is too large to review. Is this scale confortable to review? The scale is fine. But the content is not. So I am faced with a bit of a dilemma. If I start enumerating specific reasons why it's not OK, then it's going to take more

Re: [HACKERS] Winflex

2009-12-13 Thread Andrew Dunstan
Magnus Hagander wrote: Using http://www.postgresql.org/ftp/misc/winflex/ on a 64-bit windows, but in 32-bit mode (this certainly used to work), trying to build HEAD. first of all, it returns error code 128 when running flex -V, which means our script claims it doesn't work. Commenting out

Re: [HACKERS] Winflex

2009-12-13 Thread Petr Jelinek
Magnus Hagander napsal(a): On Sun, Dec 13, 2009 at 11:36, Dave Page dp...@pgadmin.org wrote: On Sun, Dec 13, 2009 at 5:42 AM, Andrew Dunstan and...@dunslane.net wrote: Yes. I spent a few cents and a few hours wrestling with it. AFAICT your are hosed on 64bit Windows. I can't get flex

[HACKERS] compiling with Visual Studio

2009-12-13 Thread Joe Conway
I'm trying to get PL/R binaries built on Windows, which I have not been able to do successfully since the switch to Visual Studio from MinGW in PostgreSQL 8.3. For some reason the MinGW PL/R binary does not load in the VS compiled Postgres. Everything works if I also build PostgreSQL with MinGW,

Re: [HACKERS] compiling with Visual Studio

2009-12-13 Thread Magnus Hagander
On Sun, Dec 13, 2009 at 19:45, Joe Conway m...@joeconway.com wrote: I'm trying to get PL/R binaries built on Windows, which I have not been able to do successfully since the switch to Visual Studio from MinGW in PostgreSQL 8.3. For some reason the MinGW PL/R binary does not load in the VS

Re: [HACKERS] compiling with Visual Studio

2009-12-13 Thread Joe Conway
On 12/13/2009 10:48 AM, Magnus Hagander wrote: 2) If not, does anyone have a link for VS 2005? I haven't been able to locate it on the MS site. Yes. I'm unsure if they want that public or anything, so I'll send it to you offlist :-) Thanks! 3) Once I get Postgres compiling under VS, is

[HACKERS] WAL Info messages

2009-12-13 Thread Simon Riggs
One of the reasons for last years Rmgr plugin patch was the idea of a signalling interface between Primary and Standby nodes. Such a feature would help in producing further programmatic tests for Hot Standby. Proposal is to use up the last rmgr id, slot 7: RM_INFO_ID. Functions would be

Re: [HACKERS] Winflex

2009-12-13 Thread Andrew Dunstan
Petr Jelinek wrote: Cygwin 1.7.0-52 (iirc) with flex works for me on x64 Vista. Can you let me have the flex.exe and cygwin1.dll that I can try on a virgin WinS2k3 64-bit box? It will probably need to be configured with --disable-nls. cheers andrew -- Sent via pgsql-hackers mailing

Re: [HACKERS] Winflex

2009-12-13 Thread Petr Jelinek
Andrew Dunstan napsal(a): Petr Jelinek wrote: Cygwin 1.7.0-52 (iirc) with flex works for me on x64 Vista. Can you let me have the flex.exe and cygwin1.dll that I can try on a virgin WinS2k3 64-bit box? It will probably need to be configured with --disable-nls. This is the version I

Re: [HACKERS] [PATCH] ACE Framework - Database, Schema

2009-12-13 Thread Robert Haas
I read through the database patch a little more. Here are some further thoughts. ace_database_create() calls have_createdb_privilege(), but of course what ace_database_create() is supposed to be checking is whether you have privileges to create the DB. This is extremely confusing. The calling

Re: [HACKERS] WAL Info messages

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 2:20 PM, Simon Riggs si...@2ndquadrant.com wrote: This would allow the writing of a test suite that can create certain conditions on the primary, then send notification of the event to the standby. Standby would then halt recovery in a precise state while a user runs an

Re: [HACKERS] WAL Info messages

2009-12-13 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: Proposal is to use up the last rmgr id, slot 7: RM_INFO_ID. Functions would be provided on primary side to send a user-defined binary message into WAL stream, with a single message type XLOG_INFO_MSG. (Superuser only, though can be wrapped and given

Re: [HACKERS] Hot Standby, release candidate?

2009-12-13 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: * NonTransactionalInvalidation logging has been removed following review, but AFAICS that means VACUUM FULL doesn't work correctly on catalog tables, which regrettably will be the only ones still standing even after we apply VFI patch. Did I

Re: [HACKERS] compiling with Visual Studio

2009-12-13 Thread Dimitri Fontaine
Le 13 déc. 2009 à 19:48, Magnus Hagander a écrit : The buildscript that's there can generate buildfiles for contrib. I haven't used it to build external contrib modules, but it's probably a pretty good start. If not, just steal the project file from another contrib module and modify the files

Re: [HACKERS] Winflex

2009-12-13 Thread Andrew Dunstan
Petr Jelinek wrote: Andrew Dunstan napsal(a): Petr Jelinek wrote: Cygwin 1.7.0-52 (iirc) with flex works for me on x64 Vista. Can you let me have the flex.exe and cygwin1.dll that I can try on a virgin WinS2k3 64-bit box? It will probably need to be configured with --disable-nls.

Re: [HACKERS] Hot Standby, release candidate?

2009-12-13 Thread Simon Riggs
On Sun, 2009-12-13 at 15:45 -0500, Tom Lane wrote: Simon Riggs si...@2ndquadrant.com writes: * NonTransactionalInvalidation logging has been removed following review, but AFAICS that means VACUUM FULL doesn't work correctly on catalog tables, which regrettably will be the only ones still

Re: [HACKERS] Largeobject Access Controls and pg_migrator

2009-12-13 Thread Takahiro Itagaki
KaiGai Kohei kai...@kaigai.gr.jp wrote: Can SELECT lo_create(16385); help this situation? SELECT lo_create(loid) FROM (SELECT DISTINCT loid FROM pg_largeobject) AS t would work for pg_migrator. I'm not clear whether we also check pg_largeobejct has chunks with same LOID on lo_create(). In

Re: [HACKERS] Largeobject Access Controls (r2460)

2009-12-13 Thread Takahiro Itagaki
KaiGai Kohei kai...@kaigai.gr.jp wrote: We don't have any reason why still CASE ... WHEN and subquery for the given LOID. Right? Ah, I see. I used your suggestion. I applied the bug fixes. Our tools and contrib modules will always use pg_largeobject_metadata instead of pg_largeobject to

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Takahiro Itagaki
Robert Haas robertmh...@gmail.com wrote: OK, done, see attached. I also noticed when looking through this that the documentation says that auto_explain.log_buffers is ignored unless auto_explain.log_analyze is set. That is true and seems right to me, but for some reason

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 7:55 PM, Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: Robert Haas robertmh...@gmail.com wrote: OK, done, see attached.  I also noticed when looking through this that the documentation says that auto_explain.log_buffers is ignored unless

Re: [HACKERS] Streaming replication and non-blocking I/O

2009-12-13 Thread Fujii Masao
On Sun, Dec 13, 2009 at 5:42 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Walreceiver wants to wait for data to arrive from the master or a signal. PQgetXLogData(), which is the libpq function to read a piece of WAL, takes a timeout argument to support that. Walreceiver

Re: [HACKERS] Streaming replication and non-blocking I/O

2009-12-13 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: On Sun, Dec 13, 2009 at 5:42 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: To implement the timeout in PQgetXLogData(), pqWaitTimed() was changed to take a timeout instead of finishing_time argument. Which is a mistake because it

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Takahiro Itagaki
Robert Haas robertmh...@gmail.com wrote: I have a question about the comment in InstrStopNode(), which reads: Adds delta of buffer usage to node's count and resets counter to start so that the counters are not double counted by parent nodes. It then calls BufferUsageAccumDiff(), but that

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Tom Lane
Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: Should I add countBufferUsage boolean arguments to all places doInstrument booleans are currently used? This requires several minor modifications of codes in many places. Pushing extra arguments around would create overhead of its own ...

Re: [HACKERS] pg_dump enhancement proposal

2009-12-13 Thread daveg
On Thu, Nov 12, 2009 at 04:31:37PM -0500, Tom Lane wrote: Mark Hammonds mhammo...@omniti.com writes: 2. Custom Query Exports In my use of mysqldump, I found one feature very useful: the ability to execute a custom SELECT. . .WHERE statement and then dump only the results. This

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Takahiro Itagaki
Tom Lane t...@sss.pgh.pa.us wrote: Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: Should I add countBufferUsage boolean arguments to all places doInstrument booleans are currently used? This requires several minor modifications of codes in many places. Pushing extra arguments

Re: [HACKERS] Streaming replication and non-blocking I/O

2009-12-13 Thread Fujii Masao
On Mon, Dec 14, 2009 at 11:38 AM, Tom Lane t...@sss.pgh.pa.us wrote: Do we need a new PQgetXLogData function at all?  Seems like you could shove the data through the COPY protocol and not have to touch libpq at all, rather than duplicating a nontrivial amount of code there. Yeah, I also think

Re: [HACKERS] [PATCH] ACE Framework - Database, Schema

2009-12-13 Thread KaiGai Kohei
Robert, Thanks for your detailed comments. Just to name a few really obvious problems (I only looked at the 01-database patch): 1. We have been talking for several days about the need to make the initial patch in this area strictly a code cleanup patch. Is this cleaner than the code that

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 10:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp writes: Should I add countBufferUsage boolean arguments to all places doInstrument booleans are currently used? This requires several minor modifications of codes in many

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 10:00 PM, Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: Two other thoughts: 1. It doesn't appear that there is any provision to ever zero pgBufferUsage.  Shouldn't we do this, say, once per explain, just to avoid the possibility of overflowing the counters?

Re: [HACKERS] thread safety on clients

2009-12-13 Thread Greg Stark
On Fri, Dec 11, 2009 at 6:08 PM, Tom Lane t...@sss.pgh.pa.us wrote: I wrote: I'll commit a fix for that shortly, but this reminds me once again that the EvalPlanQual logic is desperately under-tested in our normal regression testing.  We really need some kind of testing infrastructure that

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Takahiro Itagaki
Robert Haas robertmh...@gmail.com wrote: Well, I think we need to do something. I don't really want to tack another 5-6% overhead onto EXPLAIN ANALYZE. Maybe we could recast the doInstrument argument as a set of OR'd flags? I'm thinking the same thing (OR'd flags) right now. The attached

Re: [HACKERS] [PATCH] ACE Framework - Database, Schema

2009-12-13 Thread Robert Haas
2009/12/13 KaiGai Kohei kai...@ak.jp.nec.com: Just to name a few really obvious problems (I only looked at the 01-database patch): 1. We have been talking for several days about the need to make the initial patch in this area strictly a code cleanup patch.  Is this cleaner than the code that

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 11:49 PM, Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: Robert Haas robertmh...@gmail.com wrote: Well, I think we need to do something.  I don't really want to tack another 5-6% overhead onto EXPLAIN ANALYZE.  Maybe we could recast the doInstrument argument

[HACKERS] Re: Hot Standby, deferred conflict resolution for cleanup records (v2)

2009-12-13 Thread Greg Stark
On Sat, Dec 12, 2009 at 3:06 PM, Simon Riggs si...@2ndquadrant.com wrote: Anyone acquiring a lock on a table should check the latestRemovedXid for the table and abort if their xmin is too old. This prevents new lockers from accessing a cleaned relation immediately after we decide to abort

Re: [HACKERS] Row-Level Security

2009-12-13 Thread KaiGai Kohei
Robert Haas wrote: On Sun, Dec 13, 2009 at 3:50 AM, KaiGai Kohei kai...@kaigai.gr.jp wrote: Basically, right. In my branch, SE-PgSQL put its hook after all the BR trigger invocations.

Re: [HACKERS] WAL Info messages

2009-12-13 Thread Greg Stark
On Sun, Dec 13, 2009 at 7:20 PM, Simon Riggs si...@2ndquadrant.com wrote: On Standby side, we would provide a plugin interface to allow the message to be read and handled by user-written code. This would then allow a simple value or notification to be passed to a waiting (polling) connection

Re: [HACKERS] Row-Level Security

2009-12-13 Thread Robert Haas
2009/12/13 KaiGai Kohei kai...@ak.jp.nec.com: Robert Haas wrote: On Sun, Dec 13, 2009 at 3:50 AM, KaiGai Kohei kai...@kaigai.gr.jp wrote: Basically, right. In my branch, SE-PgSQL put its hook after all the BR trigger invocations.

Re: [HACKERS] [PATCH] ACE Framework - Database, Schema

2009-12-13 Thread KaiGai Kohei
Robert Haas wrote: 2009/12/13 KaiGai Kohei kai...@ak.jp.nec.com: Just to name a few really obvious problems (I only looked at the 01-database patch): 1. We have been talking for several days about the need to make the initial patch in this area strictly a code cleanup patch. Is this

Re: [HACKERS] WAL Info messages

2009-12-13 Thread Heikki Linnakangas
Simon Riggs wrote: Proposal is to use up the last rmgr id, slot 7: RM_INFO_ID. Rmgr id is a 8-bit integer, there's plenty of free rmgr ids left. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] Row-Level Security

2009-12-13 Thread KaiGai Kohei
Robert Haas wrote: One point. MAC is mandatory, so the table owner should not be able to control whether row-level checks are applied, or not. So, I used a special purpose system column to represent security label. It is generated for each tables, and no additional storage consumption when

[HACKERS] Re: Hot Standby, deferred conflict resolution for cleanup records (v2)

2009-12-13 Thread Heikki Linnakangas
Greg Stark wrote: On Sat, Dec 12, 2009 at 3:06 PM, Simon Riggs si...@2ndquadrant.com wrote: Anyone acquiring a lock on a table should check the latestRemovedXid for the table and abort if their xmin is too old. This prevents new lockers from accessing a cleaned relation immediately after we

[HACKERS] Range types

2009-12-13 Thread Scott Bailey
I had proposed a temporal contrib module earlier and you wanted to see support for many range types not just timestamptz. So I had an idea on how to implement this but I want to see if you guys thought it was a viable idea. So basically I have an anyrange pseudo type with the functions prev,