Re: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane escribió: >> I looked at that and decided it was OK as-is. How do you want to >> change it? > The reason that it doesn't need locks is not that there's no other > process running, but that it was already initialized, in the case when > found is false. Mph. Th

Re: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera writes: > > Itagaki Takahiro escribi�: > >> Here is a patch to fix pg_stat_statements on Windows. > > > Hmm, it seems the comment just above the patched line needs to be fixed. > > I looked at that and decided it was OK as-is. How do you want to > change it?

Re: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Tom Lane
Alvaro Herrera writes: > Itagaki Takahiro escribió: >> Here is a patch to fix pg_stat_statements on Windows. > Hmm, it seems the comment just above the patched line needs to be fixed. I looked at that and decided it was OK as-is. How do you want to change it? regards, t

Re: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Tom Lane
Itagaki Takahiro writes: > Here is a patch to fix pg_stat_statements on Windows. Yeah, that looks about right to me. Committed. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.post

Re: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Alvaro Herrera
Itagaki Takahiro escribió: > > Tom Lane wrote: > > > > We should call [Read dumpfile] routine only once even on Windows. > > Seems to me that you should simply do the load only when found is false. > > Here is a patch to fix pg_stat_statements on Windows. Hmm, it seems the comment just above t

Re: [HACKERS] Merge Append Patch merged up to 85devel

2009-07-26 Thread Tom Lane
Gregory Stark writes: > Here's a copy of the merge-append patch that I sent months ago merged up to > head. I haven't really added any additional functionality since then. I looked at the planner part of this a little bit. I think that it's confusing "an append that produces an ordered result" w

Re: [HACKERS] autogenerating headers & bki stuff

2009-07-26 Thread Robert Haas
On Sun, Jul 26, 2009 at 8:46 PM, Tom Lane wrote: > Robert Haas writes: >> Introducing defaults for DATA() would bring some benefits because it >> would mostly avoid the need to change every row in the file when >> adding a new column.  But a preprocessing script can do much more >> sophisticated t

Re: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Itagaki Takahiro
Tom Lane wrote: > > We should call [Read dumpfile] routine only once even on Windows. > Seems to me that you should simply do the load only when found is false. Here is a patch to fix pg_stat_statements on Windows. I see we don't need any locks because initialization is done in postmaster; The

Re: [HACKERS] generic explain options v3

2009-07-26 Thread Robert Haas
On Sun, Jul 26, 2009 at 7:40 PM, Tom Lane wrote: > Robert Haas writes: >> Here's the update.  There are a few things that I'm not entirely happy >> with here, but not quite sure what to do about either. > > Committed with a few editorializations. Thanks. >> - ExplainPrintPlan() is now almost tri

Re: [HACKERS] autogenerating headers & bki stuff

2009-07-26 Thread Alvaro Herrera
Tom Lane escribió: > I experimented with that a little bit and found it doesn't seem to be > tremendously easy. A non-bootstrap-mode backend will PANIC immediately > on startup if it doesn't find the critical system indexes, so the second > step has issues. Also, there is no provision for resumi

Re: [HACKERS] autogenerating headers & bki stuff

2009-07-26 Thread Tom Lane
Robert Haas writes: > On Sun, Jul 26, 2009 at 1:58 PM, Tom Lane wrote: >> I think we need to try to get *all* of the operator >> classes out of the hand-maintained-DATA-entries collection. > Is this mostly a forward-reference problem? No, I don't see that as particularly the issue. What I'm con

Re: [HACKERS] autogenerating headers & bki stuff

2009-07-26 Thread Tom Lane
Robert Haas writes: > Introducing defaults for DATA() would bring some benefits because it > would mostly avoid the need to change every row in the file when > adding a new column. But a preprocessing script can do much more > sophisticated transformations, like computing a value for a column, or

Re: [HACKERS] generic explain options v3

2009-07-26 Thread Tom Lane
Robert Haas writes: > Here's the update. There are a few things that I'm not entirely happy > with here, but not quite sure what to do about either. Committed with a few editorializations. > - ExplainPrintPlan() is now almost trivial. It seems like there > should be some way to get rid of this

Re: [HACKERS] When is a record NULL?

2009-07-26 Thread Eric B. Ridge
On Jul 26, 2009, at 6:46 PM, David E. Wheeler wrote: Is there some way to get using_while() to properly return all the records? I'm just a random lurker, but FOUND seems to work just fine (I suppose it's PG-specific?). http://www.postgresql.org/docs/8.1/static/plpgsql-statements.html#PLPG

Re: [HACKERS] When is a record NULL?

2009-07-26 Thread Sam Mason
On Sun, Jul 26, 2009 at 03:46:19PM -0700, David E. Wheeler wrote: > And something I'd like to be able to handle in a while loop, as I'm > actually fetching one row at a time from two cursors and need to be > able to tell when I've reached the end of a cursor. I'm sure I'm missing something obv

Re: [HACKERS] When is a record NULL?

2009-07-26 Thread David E. Wheeler
On Jul 25, 2009, at 4:41 PM, David E. Wheeler wrote: Useless perhaps, but it's gonna happen, and someone may even have a reason for it. Until such time as NULLs are killed off, we need to be able to deal with SQL's pathologies. And something I'd like to be able to handle in a while loop, as

Re: [HACKERS] When is a record NULL?

2009-07-26 Thread Sam Mason
On Sun, Jul 26, 2009 at 12:49:32PM -0500, Kevin Grittner wrote: > Codd, E.F. (1990). The Relational Model for Database Management > (Version 2 ed.). Addison Wesley Publishing Company. > ISBN 0-201-14192-2. Looks as though I've got some reading to do then--somewhat annoying that only second hand co

Re: [HACKERS] When is a record NULL?

2009-07-26 Thread Greg Stark
On Sun, Jul 26, 2009 at 6:49 PM, Kevin Grittner wrote: > Also, the > requirement that, to be considered a relational database, it must be > impossible to write two queries which can be shown to be logically > equivalent but which optimize to different access plans to be, well, a > bit "ivory tower.

Re: [HACKERS] SE-PostgreSQL Specifications

2009-07-26 Thread KaiGai Kohei
Andrew Dunstan wrote: KaiGai Kohei wrote: Andrew Dunstan wrote: KaiGai Kohei wrote: The SELinux provides a certain process privilege to make backups and restore them. In the (currect) default policy, it is called "unconfined". However, it is also *possible* to define a new special proc

Re: [HACKERS] CommitFest Status Summary - 2009-07-25

2009-07-26 Thread Heikki Linnakangas
Robert Haas wrote: > I think Joe is back in the next week, but I'm not sure about Michael or > Heikki. I'll be back on Monday 3rd of August. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make chang

Re: [HACKERS] CommitFest Status Summary - 2009-07-25

2009-07-26 Thread Robert Haas
On Sun, Jul 26, 2009 at 12:07 PM, Tom Lane wrote: > Robert Haas writes: >> ... One thing I have belatedly realized about this >> CommitFest is that we (or at least, I) did not think about asking the >> committers about their schedules, and it turns out that three of them >> - Heikki, Michael Meske

Re: [HACKERS] autogenerating headers & bki stuff

2009-07-26 Thread Robert Haas
On Sun, Jul 26, 2009 at 1:58 PM, Tom Lane wrote: > Greg Stark writes: >> AFAICT the only opclasses that need to be in the bootstrap set are >> int2_ops, int4_ops, name_ops, oid_ops, and oidvector_ops. > > Maybe so, but the first two are part of the integer_ops family.  If > we have to continue imp

Re: [HACKERS] autogenerating headers & bki stuff

2009-07-26 Thread Robert Haas
On Sun, Jul 26, 2009 at 11:31 AM, Tom Lane wrote: > Robert Haas writes: >> On Sat, Jul 25, 2009 at 6:40 PM, Tom Lane wrote: >>> I'm not nearly as excited about migrating all or even most of, say, >>> the pg_proc DATA lines into SQL. > >> I think it would actually buy you quite a bit to migrate the

[HACKERS] query - change in gistentryinit between 8.1 and 8.2

2009-07-26 Thread Pavel Stehule
Hello, I try to write GiST support for one custom type and I am not sure about compress function. I don't understand where I can specify size of returned compressed key. 8.1 and older had 6. parameter for size, but this parameter is missing in new versions. Can somebody explain, where pg take inf

Re: [HACKERS] autogenerating headers & bki stuff

2009-07-26 Thread Tom Lane
Greg Stark writes: > AFAICT the only opclasses that need to be in the bootstrap set are > int2_ops, int4_ops, name_ops, oid_ops, and oidvector_ops. Maybe so, but the first two are part of the integer_ops family. If we have to continue implementing all of that through DATA statements then we have

Re: [HACKERS] When is a record NULL?

2009-07-26 Thread Kevin Grittner
Sam Mason wrote: > I've not read much of his writings, any canonical references for > this sort of discussion? I think this is the one, although it's been a while since I read it, and I might be getting it confused with something else he wrote: Codd, E.F. (1990). The Relational Model for Da

Re: [HACKERS] Review: support for multiplexing SIGUSR1

2009-07-26 Thread Tom Lane
Fujii Masao writes: > I updated the patch to solve two problems which you pointed. > Here is the changes: > * Prevented the obsolete flag to being set to a new process, by using >newly-introduced spinlock. > * Used the index of AuxiliaryProcs instead of auxType, to assign >backend ID to

Re: [HACKERS] autogenerating headers & bki stuff

2009-07-26 Thread Greg Stark
On Sun, Jul 26, 2009 at 5:48 PM, Tom Lane wrote: > > In the spirit of not inventing single-purpose solutions, I suggest > that the BKI representation for this might be something like > > BKI_EXECUTE( any old SQL command ); > > where the bootstrap.c code just passes the given string to the main SQL

Re: [HACKERS] SE-PostgreSQL Specifications

2009-07-26 Thread Ron Mayer
Robert Haas wrote: > If you want to store intelligence data about the war in Iraq and > intelligence data about the war in Afghanistan, it might not be too > bad to store them in separate databases, though storing them in the > same database might also make things simpler for users who have access

Re: [HACKERS] autogenerating headers & bki stuff

2009-07-26 Thread Tom Lane
I wrote: > ... So maybe we could split the current bootstrap phase > into three phases: > * create core catalogs and load DATA commands, using bki > * create operator classes, using sql script > * create indexes, using bki > * proceed on as before I experimented with that a

Re: [HACKERS] CommitFest Status Summary - 2009-07-25

2009-07-26 Thread Tom Lane
Robert Haas writes: > ... One thing I have belatedly realized about this > CommitFest is that we (or at least, I) did not think about asking the > committers about their schedules, and it turns out that three of them > - Heikki, Michael Meskes, Joe Conway - are away at the moment. About > 25% of

Re: [HACKERS] autogenerating headers & bki stuff

2009-07-26 Thread Andrew Dunstan
Tom Lane wrote: Robert Haas writes: On Sat, Jul 25, 2009 at 6:40 PM, Tom Lane wrote: I'm not nearly as excited about migrating all or even most of, say, the pg_proc DATA lines into SQL. I think it would actually buy you quite a bit to migrate them to SQL, because in SQL,

Re: [HACKERS] autogenerating headers & bki stuff

2009-07-26 Thread Tom Lane
Robert Haas writes: > On Sat, Jul 25, 2009 at 6:40 PM, Tom Lane wrote: >> I'm not nearly as excited about migrating all or even most of, say, >> the pg_proc DATA lines into SQL. > I think it would actually buy you quite a bit to migrate them to SQL, > because in SQL, default properties can genera

Re: [HACKERS] SE-PostgreSQL Specifications

2009-07-26 Thread Andrew Dunstan
KaiGai Kohei wrote: Andrew Dunstan wrote: KaiGai Kohei wrote: The SELinux provides a certain process privilege to make backups and restore them. In the (currect) default policy, it is called "unconfined". However, it is also *possible* to define a new special process privilege for back

Re: [HACKERS] SE-PostgreSQL Specifications

2009-07-26 Thread KaiGai Kohei
Andrew Dunstan wrote: KaiGai Kohei wrote: The SELinux provides a certain process privilege to make backups and restore them. In the (currect) default policy, it is called "unconfined". However, it is also *possible* to define a new special process privilege for backup and restore tools. For

Re: [HACKERS] SE-PostgreSQL Specifications

2009-07-26 Thread KaiGai Kohei
Sam Mason wrote: On Sun, Jul 26, 2009 at 12:27:12PM +0900, KaiGai Kohei wrote: Indeed, the draft used the term of "security context" with minimum introductions, but not enough friendliness for database folks. The purpose of security context is an identifier of any subject and object to describe

Re: [HACKERS] Patch for 8.5, transformationHook

2009-07-26 Thread Pavel Stehule
Hello note about SQL:201x http://blogs.mysql.com/peterg/2009/06/07/soothsaying-sql-standardization-stuff/ regards Pavel Stehule 2009/7/26 Pavel Stehule : > Hello > > new patch add new contrib "transformations" with three modules > anotation, decode and json. > > These modules are ported from my

Re: [HACKERS] Patch for 8.5, transformationHook

2009-07-26 Thread Pavel Stehule
Hello new patch add new contrib "transformations" with three modules anotation, decode and json. These modules are ported from my older work. Before applying this patch, please use named-fixed patch too. The hook doesn't need it, but modules anotation and json depend on it. Regards Pavel Stehul

Re: [HACKERS] SE-PostgreSQL Specifications

2009-07-26 Thread Andrew Dunstan
KaiGai Kohei wrote: The SELinux provides a certain process privilege to make backups and restore them. In the (currect) default policy, it is called "unconfined". However, it is also *possible* to define a new special process privilege for backup and restore tools. For example, it can access

Re: [HACKERS] SE-PostgreSQL Specifications

2009-07-26 Thread Sam Mason
On Sun, Jul 26, 2009 at 12:27:12PM +0900, KaiGai Kohei wrote: > Indeed, the draft used the term of "security context" with minimum > introductions, but not enough friendliness for database folks. > > The purpose of security context is an identifier of any subject and > object to describe them in t

Re: [HACKERS] SE-PostgreSQL Specifications

2009-07-26 Thread Sam Mason
On Sun, Jul 26, 2009 at 01:42:32PM +0900, KaiGai Kohei wrote: > Robert Haas wrote: > >Sam Mason wrote: > >>The traditional approach would be to maintain multiple physically > >>separate databases; in this setup it's obvious that when you perform a > >>backup of one of these databases you're only se

Re: [HACKERS] [PATCH] DefaultACLs

2009-07-26 Thread Petr Jelinek
Joshua Tolley weote: On Sat, Jul 25, 2009 at 08:41:12PM -0400, Robert Haas wrote: On Sat, Jul 25, 2009 at 8:39 PM, Joshua Tolley wrote: Immediately after concluding I was done with my review, I realized I'd completely forgotten to look at the docs. I've made a few changes based solely o