[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,

[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 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: 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 con

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] [PATCH] ACE Framework - Database, Schema

2009-12-13 Thread KaiGai Kohei
Robert Haas wrote: > 2009/12/13 KaiGai Kohei : >>> 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

Re: [HACKERS] Row-Level Security

2009-12-13 Thread Robert Haas
2009/12/13 KaiGai Kohei : > Robert Haas wrote: >> On Sun, Dec 13, 2009 at 3:50 AM, KaiGai Kohei wrote: >>> Basically, right. In my branch, SE-PgSQL put its hook after all the BR >>> trigger invocations. >>> >>> http://code.google.com/p/sepgsql/source/browse/branches/pgsql-8.4.x/sepgsql/src/backend

Re: [HACKERS] WAL Info messages

2009-12-13 Thread Greg Stark
On Sun, Dec 13, 2009 at 7:20 PM, Simon Riggs 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 on standby. If new

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 wrote: >> Basically, right. In my branch, SE-PgSQL put its hook after all the BR >> trigger invocations. >> >> http://code.google.com/p/sepgsql/source/browse/branches/pgsql-8.4.x/sepgsql/src/backend/executor/execMain.c#1883 >> >> B

[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 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 > anyone looking at that

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 11:49 PM, Takahiro Itagaki wrote: > > Robert Haas 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

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

2009-12-13 Thread Robert Haas
2009/12/13 KaiGai Kohei : >> 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 it is re

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Takahiro Itagaki
Robert Haas 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 patch adds INSTRUME

Re: [HACKERS] thread safety on clients

2009-12-13 Thread Greg Stark
On Fri, Dec 11, 2009 at 6:08 PM, Tom Lane 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 would let us exe

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 10:00 PM, Takahiro Itagaki 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? > > I think the overflo

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 10:15 PM, Tom Lane wrote: > Takahiro Itagaki 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

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 t

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 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 that all data

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Takahiro Itagaki
Tom Lane wrote: > Takahiro Itagaki 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 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 feature current

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Tom Lane
Takahiro Itagaki 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 ... overhead that would be paid

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Takahiro Itagaki
Robert Haas 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 function doesn't >

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

2009-12-13 Thread Tom Lane
Fujii Masao writes: > On Sun, Dec 13, 2009 at 5:42 AM, Heikki Linnakangas > 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 breaks PQconnectdb, and as I said I don't think >>

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 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 calls > PQgetXLogData() in an endles

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 7:55 PM, Takahiro Itagaki wrote: > > Robert Haas 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 t

Re: [HACKERS] EXPLAIN BUFFERS

2009-12-13 Thread Takahiro Itagaki
Robert Haas 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 explain_ExecutorEnd() had been change

Re: [HACKERS] Largeobject Access Controls (r2460)

2009-12-13 Thread Takahiro Itagaki
KaiGai Kohei 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 enumerate large objects

Re: [HACKERS] Largeobject Access Controls and pg_migrator

2009-12-13 Thread Takahiro Itagaki
KaiGai Kohei 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 the regular opera

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 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

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. T

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 f

Re: [HACKERS] Hot Standby, release candidate?

2009-12-13 Thread Tom Lane
Simon Riggs 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 misunderstand the original i

Re: [HACKERS] WAL Info messages

2009-12-13 Thread Tom Lane
Simon Riggs 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 to > trusted users)

Re: [HACKERS] WAL Info messages

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 2:20 PM, Simon Riggs 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 appropriate test.

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 s

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 am

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 l

[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 provided

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 V

Re: [HACKERS] compiling with Visual Studio

2009-12-13 Thread Magnus Hagander
On Sun, Dec 13, 2009 at 19:45, Joe Conway 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 compiled Postgres.

[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, bu

Re: [HACKERS] Winflex

2009-12-13 Thread Petr Jelinek
Magnus Hagander napsal(a): On Sun, Dec 13, 2009 at 11:36, Dave Page wrote: On Sun, Dec 13, 2009 at 5:42 AM, Andrew Dunstan 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 oddl

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 t

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

2009-12-13 Thread Robert Haas
2009/12/13 KaiGai Kohei : > 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 time than I reall

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 com

Re: [HACKERS] Row-Level Security

2009-12-13 Thread Robert Haas
On Sun, Dec 13, 2009 at 3:50 AM, KaiGai Kohei wrote: > (2009/12/13 12:18), Robert Haas wrote: >> On Sat, Dec 12, 2009 at 7:41 PM, Josh Berkus  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 different from the RLS >>>

Re: [HACKERS] Winflex

2009-12-13 Thread Magnus Hagander
On Sun, Dec 13, 2009 at 11:36, Dave Page wrote: > On Sun, Dec 13, 2009 at 5:42 AM, Andrew Dunstan 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

Re: [HACKERS] Winflex

2009-12-13 Thread Dave Page
On Sun, Dec 13, 2009 at 5:42 AM, Andrew Dunstan 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 - see >

[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 conta

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 Berkus 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 users want is diffe