[HACKERS] drop tablespace error: invalid argument

2009-08-16 Thread Jan Otto
hello hackers, i have problems dropping an existing empty tablespace. here is a reduced example: AscheMobil:~ asche$ cat test2.sql CREATE TABLESPACE testspace LOCATION '/opt/postgresql/data2'; CREATE SCHEMA testschema; CREATE TABLE testschema.foobar (id int) TABLESPACE testspace; DROP SCHEMA

Re: [HACKERS] freezing tuples ( was: Why is vacuum_freeze_min_age 100m? )

2009-08-16 Thread Peter Eisentraut
On lör, 2009-08-15 at 16:55 -0700, Jeff Davis wrote: > Similarly, you could call vacuum_freeze_min_age "the maximum age a > tuple > can be before a vacuum will freeze it". Heh, you could also call max_connections the "minimum number of connections before the server will refuse new connection attem

[HACKERS] docs for random function

2009-08-16 Thread Sam Mason
Hi, The docs for the function random() currently say: random value between 0.0 and 1.0, inclusive this isn't a particularly useful invariant, what the code actually does (and is commented as doing) is much more useful. Any chance of changing it to something like: --- doc/src/sgml/func.sgml~

Re: [HACKERS] [PATCH] plpythonu datatype conversion improvements

2009-08-16 Thread Pierre Frédéric Caillau d
Primary motivation of the attached patch is to support handling bytea conversion allowing for embedded nulls, which in turn allows for supporting the marshal module. Secondary motivation is slightly improved performance for conversion routines of basic datatypes that have simple mappings betwee

Re: [HACKERS] GRANT ON ALL IN schema

2009-08-16 Thread Peter Eisentraut
On sön, 2009-08-16 at 00:04 -0400, Andrew Dunstan wrote: > SQL is not Lisp. Simple is good. I didn't think Peter was really very > serious. Well, I don't know if we really need to call it "lambda", but I fully expect to be able to use these "ad hoc functions" as part of other expressions. So ma

Re: [HACKERS] GRANT ON ALL IN schema

2009-08-16 Thread Pavel Stehule
2009/8/16 Peter Eisentraut : > On sön, 2009-08-16 at 00:04 -0400, Andrew Dunstan wrote: >> SQL is not Lisp. Simple is  good. I didn't think Peter was really very >> serious. > > Well, I don't know if we really need to call it "lambda", but I fully > expect to be able to use these "ad hoc functions"

Re: [HACKERS] GRANT ON ALL IN schema

2009-08-16 Thread Sam Mason
On Sun, Aug 16, 2009 at 03:57:08PM +0300, Peter Eisentraut wrote: > On 2009-08-16 at 00:04 -0400, Andrew Dunstan wrote: > > SQL is not Lisp. Simple is good. I didn't think Peter was really very > > serious. > > Well, I don't know if we really need to call it "lambda", but I fully > expect to be

Re: [HACKERS] Split-up ECPG patches

2009-08-16 Thread Michael Meskes
On Fri, Aug 14, 2009 at 10:12:24PM +0200, Boszormenyi Zoltan wrote: > Will add the ecpg_log(). What the code does is: > - sets up a minimal SQLDA on the first call (called with NULL ptr), > so the field types and field names and some other properties are in place. > doesn't do further work if o

Re: [HACKERS] Split-up ECPG patches

2009-08-16 Thread Boszormenyi Zoltan
Michael Meskes írta: > On Fri, Aug 14, 2009 at 10:12:24PM +0200, Boszormenyi Zoltan wrote: > >> Will add the ecpg_log(). What the code does is: >> - sets up a minimal SQLDA on the first call (called with NULL ptr), >> so the field types and field names and some other properties are in place. >

Re: [HACKERS] GRANT ON ALL IN schema

2009-08-16 Thread Tom Lane
Peter Eisentraut writes: > On sön, 2009-08-16 at 00:04 -0400, Andrew Dunstan wrote: >> SQL is not Lisp. Simple is good. I didn't think Peter was really very >> serious. > Well, I don't know if we really need to call it "lambda", but I fully > expect to be able to use these "ad hoc functions" a

Re: [HACKERS] drop tablespace error: invalid argument

2009-08-16 Thread Tom Lane
Jan Otto writes: > ERROR: could not read directory "pg_tblspc/16464": Invalid argument > STATEMENT: DROP TABLESPACE testspace; Hmm ... can't reproduce this here, not even on OSX. From the version number I suspect you are using unreleased Snow Leopard. I'd venture it's a newly-introduced kerne

Re: [HACKERS] GRANT ON ALL IN schema

2009-08-16 Thread daveg
On Sat, Aug 15, 2009 at 11:34:04PM +0200, Dimitri Fontaine wrote: > Nitpicking dept, I think I prefer: > > DO [ [LANGUAGE] language] $$ ... $$; > DO plperl $$ ... $$; > DO language plpython $$ ... $$; > > language is optional and defaults to plpgsql. +1 -dg -- David Gould da...@soni

Re: [HACKERS] GRANT ON ALL IN schema

2009-08-16 Thread daveg
On Sun, Aug 16, 2009 at 02:59:53PM +0200, Pavel Stehule wrote: > 2009/8/16 Peter Eisentraut : > > On sön, 2009-08-16 at 00:04 -0400, Andrew Dunstan wrote: > >> SQL is not Lisp. Simple is  good. I didn't think Peter was really very > >> serious. > > > > Well, I don't know if we really need to call i

Re: [HACKERS] Wisconsin benchmark

2009-08-16 Thread Josh Berkus
> I tend to agree with this opinion. That benchmark is obsolete to the > point of having zero connection to the modern world; which is why we > keep not noticing when it's busted. Anyone want to argue for keeping it > in our sources? +1 on removing it. -- Josh Berkus PostgreSQL Experts Inc. w

Re: [HACKERS] docs for random function

2009-08-16 Thread Tom Lane
Sam Mason writes: > The docs for the function random() currently say: > random value between 0.0 and 1.0, inclusive > this isn't a particularly useful invariant, what the code actually does > (and is commented as doing) is much more useful. Any chance of changing > it to something like: Yeah,

Re: [HACKERS] drop tablespace error: invalid argument

2009-08-16 Thread Jan Otto
ERROR: could not read directory "pg_tblspc/16464": Invalid argument STATEMENT: DROP TABLESPACE testspace; Hmm ... can't reproduce this here, not even on OSX. From the version number I suspect you are using unreleased Snow Leopard. I'd venture it's a newly-introduced kernel bug and you need t

Re: [HACKERS] docs for random function

2009-08-16 Thread Sam Mason
On Sun, Aug 16, 2009 at 03:57:23PM -0400, Tom Lane wrote: > Sam Mason writes: > > The docs for the function random() currently say: > > random value between 0.0 and 1.0, inclusive > > Yeah, it looks like Bruce changed this back in 8.2 and failed to fix > the documentation to match. I used this

Re: [HACKERS] [PATCH] plpythonu datatype conversion improvements

2009-08-16 Thread James Pye
On Aug 15, 2009, at 4:44 PM, Peter Eisentraut wrote: What's needed here, I think, is an API that takes a datum plus type information and checks whether the datum is valid within the domain. /agree =) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] join removal

2009-08-16 Thread Robert Haas
On Sun, Aug 9, 2009 at 12:19 PM, Tom Lane wrote: > Robert Haas writes: >> distinct_col_search() is going to return the relevant equality >> operator from the argument list, which is ultimately going to come >> from the RestrictInfo for the join clause.  So I need to see whether >> that's compatibl

[HACKERS] build error

2009-08-16 Thread vanek
The fmgroids.h file was incorrectly being generated by shell script Gen_fmgrtab.sh, so I had to fix the makefile so that instead of the shell script generating the .h file, perl generated it: #fmgroids.h fmgrtab.c: Gen_fmgrtab.sh $(top_srcdir)/src/include/catalog/pg_proc.h

Re: [HACKERS] Croatian translation

2009-08-16 Thread Tom Lane
=?utf-8?q?Kre=C5=A1imir_Jozi=C4=87?= writes: > My name is Krešimir Jozić. I would like to continue work on > Croatian translation. Cool, welcome. This isn't the place to submit it though. The translation team have their own list over at http://pgfoundry.org/projects/pgtranslation/

Re: [HACKERS] build error

2009-08-16 Thread Tom Lane
vanek writes: > The fmgroids.h file was incorrectly being generated by shell script > Gen_fmgrtab.sh, Uh, it works for everybody else. What platform are you testing on? (The kernel version isn't a real helpful answer, since it's unlikely this is a kernel issue.) While I'm not certain how i

Re: [HACKERS] Croatian translation

2009-08-16 Thread Alvaro Herrera
Tom Lane escribió: > =?utf-8?q?Kre=C5=A1imir_Jozi=C4=87?= writes: > > My name is Krešimir Jozić. I would like to continue work on > > Croatian translation. > > Cool, welcome. This isn't the place to submit it though. The > translation team have their own list over at > http://pgfoundry.org/pro

[HACKERS] opportunistic tuple freezing

2009-08-16 Thread Jeff Davis
Attached is a patch to implement the idea discussed here: http://archives.postgresql.org/pgsql-hackers/2009-08/msg01137.php If VACUUM freezes one tuple on a page, it's likely that there are others on the same page that are close to vacuum_freeze_min_age, but not quite. Because the page is already

[HACKERS] Encoding issues in console and eventlog on win32

2009-08-16 Thread Itagaki Takahiro
We can choose different encodings from platform-dependent one for database, but postgres writes serverlogs in the database encoding. As the result, serverlogs are filled with broken characters. The problem could occur on all platforms, however, there is a solution for win32. Since Windows supports

Re: [HACKERS] opportunistic tuple freezing

2009-08-16 Thread Greg Stark
On Mon, Aug 17, 2009 at 2:32 AM, Jeff Davis wrote: > > This patch introduces a GUC vacuum_freeze_opportunistic_ratio. If one > tuple on a page is frozen by vacuum, it effectively multiplies > vacuum_freeze_min_age by vacuum_freeze_opportunistic_ratio and uses that > lower (more aggressive) value on

Re: [HACKERS] opportunistic tuple freezing

2009-08-16 Thread Greg Stark
Looking at the patch I didn't like that duplicated the page scan in a second function without refactoring out the first scan. I think this comes from the usual noncommiter-itus of trying to modify the existing code as little as possible. At least that's the problem I've had which led to things like

Re: [HACKERS] build error

2009-08-16 Thread vanek
Uh, it works for everybody else. What platform are you testing on? (The kernel version isn't a real helpful answer, since it's unlikely this is a kernel issue.) While I'm not certain how it would lead to this exact failure, one thing to check is that your machine's clock is set correctly --- fil

Re: [HACKERS] opportunistic tuple freezing

2009-08-16 Thread Jeff Davis
On Mon, 2009-08-17 at 04:01 +0100, Greg Stark wrote: > If it's convenient to have a function to handle the scan then use it > for both scans. You could have a flag that indicates it should abort > after the first freeze. I think it would be simpler to have a return > value indicating the oldest tra

Re: [HACKERS] build error

2009-08-16 Thread Andrew Dunstan
vanek wrote: Uh, it works for everybody else. What platform are you testing on? (The kernel version isn't a real helpful answer, since it's unlikely this is a kernel issue.) While I'm not certain how it would lead to this exact failure, one thing to check is that your machine's clock is set c

Re: [HACKERS] opportunistic tuple freezing

2009-08-16 Thread Jeff Davis
On Mon, 2009-08-17 at 03:43 +0100, Greg Stark wrote: > I thought Josh's idea to apply this opportunistic threshold if the > page is already dirty for any reason was a good idea. Is there a good way to tell if a buffer is dirty or not? I don't see an exported function to do that. I could check by

Re: [HACKERS] WIP: generalized index constraints

2009-08-16 Thread Jeff Davis
I'm going to try to get this patch ready for the 9-15 commitfest. Here are a few design updates: (1) Language: I think that the new language should be a table constraint, and I think there's a consensus on that. The specific language I have in mind is: CREATE TABLE ( ..., INDEX CONSTR