Re: [GENERAL] where find recent binary PostgreSQL

2007-06-01 Thread Hannes Dorbath
On 01.06.2007 03:01, Andreas wrote: is there a packet source for recent PostgreSQL binaries? I just finished installing OpenSUSE 10.2 and like to add PostgreSQL 8.2.4 instead of the provided 8.1.5. I'd rather go with something that is at least vaguely official. PostgreSQL.org has only binaries fo

Re: [GENERAL] left outer join and values()

2007-06-01 Thread Tom Allison
Thank you for the response. I did figure this out a few minutes after I sent this post. Apologies for jumping the gun. I must say, I am absolutely impressed with what pgsql's implimentation of VALUES allows me to do. It's kind of ridiculous how much "work" goes away in my code. Too bad I c

[GENERAL] Does slonik EXECUTE SCRIPT call waits for comands termination?

2007-06-01 Thread Dmitry Koterov
Hello. Seems when I use EXECUTE SCRIPTand slonik reports PGRES_TUPLES_OK updates may NOT be finished yet on all slaves. I ran a long ALTER TABLE statement (about 3 minutes), master updated immediately after I had seen PGRES_TUPLES_OK, but slave

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Dudás József
Here is the output from gdb: #0 errfinish (dummy=0) at elog.c:312 #1 0x0827f378 in elog_finish (elevel=20, fmt=0x83586d8 "invalid memory alloc request size %lu") at elog.c:937 #2 0x082983d7 in MemoryContextAlloc (context=0x843a1ac, size=4294967293) at mcxt.c:504 #3 0x0825751d in varchar

Re: [GENERAL] Numeric performances

2007-06-01 Thread Martijn van Oosterhout
On Thu, May 31, 2007 at 09:25:27PM +0200, Vincenzo Romano wrote: > On Thursday 31 May 2007 19:42:20 Alvaro Herrera wrote: > > It is. But why do you care? You either have the correctness that > > NUMERIC gives, or you don't. > > Because FLOAT8 can be precise enough for some application and not >

Re: [GENERAL] PITR Base Backup on an idle 8.1 server

2007-06-01 Thread Simon Riggs
On Wed, 2007-05-30 at 22:41 -0400, Greg Smith wrote: > -Find something harmless I can execute in a loop that will generate WAL > activity, run that until the segment gets archived. Haven't really > thought of something good to use for that purpose yet. create table xlog_switch as select '0123

Re: [GENERAL] how to use array with "holes" ?

2007-06-01 Thread Anton
> May I ask some more complex? I want to use ONE multidimensial array - > the "id", "bytes_in" and "bytes_out". By another words, I need an > array, each element of which must contain 3 values: ttc_id, bytes_in, > bytes_out. > > I think it can be done like this: It's problem. You have to wait for

Re: [GENERAL] warm standby server stops doing checkpoints after awhile

2007-06-01 Thread Simon Riggs
On Thu, 2007-05-31 at 10:23 -0400, Tom Lane wrote: > Frank Wittig <[EMAIL PROTECTED]> writes: > > The problem is that the slave server stops checkpointing after some > > hours of working (about 24 to 48 hours of conitued log replay). > > Hm ... look at RecoveryRestartPoint() in xlog.c. Could ther

Re: [GENERAL] user restriction

2007-06-01 Thread Martijn van Oosterhout
On Fri, Jun 01, 2007 at 11:15:30AM +0530, Ashish Karalkar wrote: > Hi All, > > I want to create a user in Postgres Database. And I want to restrict > that user with some privileges. And also I want that user should be > specific to particular database. > > He should not be able to do the followin

Re: [GENERAL] how to use array with "holes" ?

2007-06-01 Thread Pavel Stehule
May I ask some more complex? I want to use ONE multidimensial array - the "id", "bytes_in" and "bytes_out". By another words, I need an array, each element of which must contain 3 values: ttc_id, bytes_in, bytes_out. I think it can be done like this: It's problem. You have to wait for 8.3 whe

Re: [GENERAL] how to use array with "holes" ?

2007-06-01 Thread Anton
you have to initialise array before using. Like: declare a int[] = '{0,0,0,0,0, .}'; begin a[10] := 11; Ok, I got it, thanks! Now I can work with simle arrays. May I ask some more complex? I want to use ONE multidimensial array - the "id", "bytes_in" and "bytes_out". By anothe

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Gregory Stark
Dudás József <[EMAIL PROTECTED]> writes: > Here is the output from gdb: > > #0 errfinish (dummy=0) at elog.c:312 > #1 0x0827f378 in elog_finish (elevel=20, >fmt=0x83586d8 "invalid memory alloc request size %lu") at elog.c:937 > #2 0x082983d7 in MemoryContextAlloc (context=0x843a1ac, size=4

[GENERAL] ERROR: domain domain1 does not allow null values

2007-06-01 Thread Igor V. Youdytsky
Hello. I've found unexpected behavior of PostgreSQL 8.2.3 CREATE DOMAIN "public"."domain1" AS integer NOT NULL; CREATE TABLE "public"."table1" ("field1" "public"."domain1") WITH OIDS; CREATE OR REPLACE FUNCTION "public"."function1" () RETURNS text AS $body$ declare a public.table1%ROWTYPE; beg

Re: [GENERAL] how to use array with "holes" ?

2007-06-01 Thread Pavel Stehule
initialisation: FOR p_tmp IN SELECT DISTINCT ON(ttc_id) ttc_id FROM ttc_ids LOOP -- get next value for index i = array_upper(p_ttc_ids, 1) + 1; IF i IS NULL THEN i := 0; END IF; --RAISE NOTICE '[%]', i; p_ttc_ids[i] := p_tmp.ttc_id; p_bytes_in[i] := 0; p_bytes_out[i] := 0; END LOOP;

Re: [GENERAL] warm standby server stops doing checkpoints afterawhile

2007-06-01 Thread Simon Riggs
On Fri, 2007-06-01 at 13:33 +0200, Frank Wittig wrote: > Simon Riggs schrieb: > > > This is repeatable, yes? > Yes, it occures every time I begin with a new base backup. And it seem > to happen during recreation of tsearch2 vectors of large amounts of data > sets. > > > Has anything crashed on yo

Re: [GENERAL] warm standby server stops doing checkpoints after awhile

2007-06-01 Thread Frank Wittig
Simon Riggs schrieb: > This is repeatable, yes? Yes, it occures every time I begin with a new base backup. And it seem to happen during recreation of tsearch2 vectors of large amounts of data sets. > Has anything crashed on your server? No. Crashes didn't occur duriung that times. > Are you usin

Re: [GENERAL] Does slonik EXECUTE SCRIPT call waits for comands termination?

2007-06-01 Thread Dmitry Koterov
Sorry for mistake, wrong mailing list. On 6/1/07, Dmitry Koterov <[EMAIL PROTECTED]> wrote: Hello. Seems when I use EXECUTE SCRIPTand slonik reports PGRES_TUPLES_OK updates may NOT be finished yet on all slaves. I ran a long ALTER TABLE sta

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Dudás József
This is the debug of last varcharout routine: Breakpoint 1, varcharout (fcinfo=0xbf8a1e7c) at varchar.c:441 441 VarChar*s = PG_GETARG_VARCHAR_P(0); 440 { (gdb) print fcinfo $25 = (FunctionCallInfo) 0xbf8a1e7c 441 VarChar*s = PG_GETARG_VARCHAR_P(0); 446

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Dudás József
Sorry I do not understand. I did not convert float to varchar. The first 3 data are char* these conver to Datum: attnum[0] = SPI_fnumber( tupdesc, "deviza_kod" ); datums[0] = DirectFunctionCall1(textin, CStringGetDatum( _selectFunction( "SELECT ertek FROM foo WHERE parameter='currency'" ) ) );

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Gregory Stark
Dudás József <[EMAIL PROTECTED]> writes: > Sorry I do not understand. I did not convert float to varchar. Well then there's some kind of miscommunication here. Your crash is happening trying to read a varchar column later. Someone sometime is putting data into that varchar column. I don't under

Re: [GENERAL] Geographic data sources, queries and questions

2007-06-01 Thread Michael Glaesemann
On May 30, 2007, at 11:51 , Gregory Stark wrote: Firstly trying to update such a key you'll immediately bump into the practical reasons why it doesn't work well. You have to update every record everywhere in the database that references that key which represents a lot of potential work.

Re: [GENERAL] ERROR: domain domain1 does not allow null values

2007-06-01 Thread Richard Huxton
Igor V. Youdytsky wrote: Hello. I've found unexpected behavior of PostgreSQL 8.2.3 CREATE DOMAIN "public"."domain1" AS integer NOT NULL; CREATE TABLE "public"."table1" ("field1" "public"."domain1") WITH OIDS; OK, so you can't have nulls in anything of type "domain1" and that's the type of pu

Re: [GENERAL] warm standby server stops doing checkpoints afterawhile

2007-06-01 Thread Teodor Sigaev
<2007-06-01 13:11:29.365 CEST:%> DEBUG: 0: Ressource manager (13) has partial state information To me, this points clearly to there being an improperly completed action in resource manager 13. (GIN) In summary, it appears that there may be an issue with the GIN code for WAL recovery and this

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Tom Lane
=?ISO-8859-2?Q?Dud=E1s_J=F3zsef?= <[EMAIL PROTECTED]> writes: > Just have problem with this conversion from TEXT - double - Datum ( > NUMERIC ) where in TEXT is a number value forexample now the value is 1.00 NUMERIC? You didn't say anything about NUMERIC before. The code you posted thinks it i

[GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Csaba Nagy
Hi all, System: postgres 8.1.3p, not a released version but a CVS checkout somewhere after 8.1.3 was released. I have a table (quite big one, 2 columns, 2166381 DB relpages, 364447136 reltuples as reported by pg_class) which is mostly inserted into, very rarely deleted from. I also have a primar

Re: [GENERAL] warm standby server stops doing checkpointsafterawhile

2007-06-01 Thread Simon Riggs
On Fri, 2007-06-01 at 16:58 +0400, Teodor Sigaev wrote: > >> <2007-06-01 13:11:29.365 CEST:%> DEBUG: 0: Ressource manager (13) > >> has partial state information > > To me, this points clearly to there being an improperly completed action > > in resource manager 13. (GIN) In summary, it appear

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Martijn van Oosterhout
Are you compiling with warnings? Because this should have blown up on you: On Fri, Jun 01, 2007 at 02:03:26PM +0200, Dudás József wrote: > PG_FUNCTION_INFO_V1(_selectFunctionB); > Datum > _selectFunctionB( char *sql ) If you've declared your function V1 then it doesn't get passed parameters like

Re: [GENERAL] warm standby server stops doing checkpoints afterawhile

2007-06-01 Thread Frank Wittig
Teodor Sigaev schrieb: > Hmm. I found that gin_xlog_cleanup doesn't reset incomplete_splits list. > Is it possible reason of bug? Sounds reasonable to me. Would explain why the system didn't ever recover from that state. I'll test your patch and report results on this list. Greetings, Frank Wit

Re: [GENERAL] warm standby server stops doing checkpointsafterawhile

2007-06-01 Thread Frank Wittig
Hi Simon, > The attached patch should show which of these it is. I'll dress it up a > little better so we have a debug option on this. Please note I've not > tested this patch myself, so Frank if you don't mind me splatting > something at you we'll see what we see. I'll test that. I have an idea

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Tom Lane
Csaba Nagy <[EMAIL PROTECTED]> writes: > System: postgres 8.1.3p, not a released version but a CVS checkout > somewhere after 8.1.3 was released. Updating to 8.1.6 or later would fix your "failed to re-find parent key" problem. > Trouble: the autovacuum daemon is still taking that table and vacuu

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Csaba Nagy
> If that table has a TOAST table you might need to mark the toast table > as disabled too. Or maybe it's forcing a vacuum because it's worried > about XID wraparound? OK, that might be the case, as I guess there are tables which were not successfully vacuumed in the last few months (DB wide vacu

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Alvaro Herrera
Csaba Nagy wrote: > Trouble: the autovacuum daemon is still taking that table and vacuums > it... how do I know ? So: > > select l.pid,c.relname from pg_locks l, pg_class c where l.pid not in > (select distinct procpid from pg_stat_activity) and l.relation=c.oid and > c.relkind='r'; > > pid |

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Csaba Nagy
On Fri, 2007-06-01 at 15:58, Alvaro Herrera wrote: > Try reindexing the table; that should make the problem go away. Also, > update to the latest of the 8.1 branch ASAP. Reindexing won't work, it would mean hours of downtime. I plan to move the DB to 8.2 via slony in ~2-3 weeks, that should take

Re: [GENERAL] SQL Manager 2007 for PostgreSQL released

2007-06-01 Thread Guillaume Lelarge
Kenneth Downs a écrit : > Nikolay Samokhvalov wrote: >> On 22 May 2007 17:47:46 -0700, EMS Database Management Solutions >> (SQLManager.net) <[EMAIL PROTECTED]> wrote: >>> We, here at EMS Database Management Solutions, are pleased to announce >>> SQL Manager 2007 for PostgreSQL - the new major vers

[GENERAL] Slightly OT.

2007-06-01 Thread gonzales
Group, I have to admit, I'm a little disappointed. I'm a HUGE advocate of PostgreSQL(to state for the record) - in fact I always keep my eyes peeled for opportunities to recommend it in my day to day business. So why am I disappointed, and who really cares? I'm disappointed because SLONY-II

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Erik Jones
On Jun 1, 2007, at 9:19 AM, Csaba Nagy wrote: On Fri, 2007-06-01 at 15:58, Alvaro Herrera wrote: Try reindexing the table; that should make the problem go away. Also, update to the latest of the 8.1 branch ASAP. Reindexing won't work, it would mean hours of downtime. I plan to move the DB

Re: [GENERAL] warm standby server stops doing checkpointsafterawhile

2007-06-01 Thread Frank Wittig
Hi Simon, > The attached patch should show which of these it is. As I thought, I can trigger the issue by letting the database recreate and reindex some ten thousand data sets. Here is what happened in the log (I cleaned it to the lines your patch provides): <2007-06-01 16:28:51.708 CEST:%> LOG

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Csaba Nagy
> How would reindexing a table imply hours of downtime? Simply, all meaningful activities on this system will sooner or later insert into this table :-) So given that we use a connection pool we end up pretty soon with all connections waiting for an insert on this table, and at that point nothing

Re: [GENERAL] PITR Base Backup on an idle 8.1 server

2007-06-01 Thread Marco Colombo
Greg Smith wrote: On Thu, 31 May 2007, Marco Colombo wrote: archive_command = 'test ! -f /var/lib/pgsql/backup_lock Under normal condition (no backup running) this will trick PG into thinking that segments get archived. If I'm not mistaken, PG should behave exactly as if no archive_command is

[GENERAL] Counting queries

2007-06-01 Thread Alexander Staubo
One year ago there was a brief discussion about possibly implementing stats for the number of queries (ie., selects) executed by the server: http://archives.postgresql.org/pgsql-performance/2006-05/msg00428.php I was hoping for something akin to the pg_stat_*_tables and its n_tup_{ins,del,upd}

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Joshua D. Drake
[EMAIL PROTECTED] wrote: Group, I have to admit, I'm a little disappointed. I'm a HUGE advocate of PostgreSQL(to state for the record) - in fact I always keep my eyes peeled for opportunities to recommend it in my day to day business. So why am I disappointed, and who really cares? I'm disa

Re: [GENERAL] Slightly OT.

2007-06-01 Thread gonzales
On Fri, 1 Jun 2007, Joshua D. Drake wrote: [EMAIL PROTECTED] wrote: Group, I have to admit, I'm a little disappointed. I'm a HUGE advocate of PostgreSQL(to state for the record) - in fact I always keep my eyes peeled for opportunities to recommend it in my day to day business. So why am I

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Alvaro Herrera
Erik Jones wrote: > On Jun 1, 2007, at 9:19 AM, Csaba Nagy wrote: > > >On Fri, 2007-06-01 at 15:58, Alvaro Herrera wrote: > >>Try reindexing the table; that should make the problem go away. > >>Also, > >>update to the latest of the 8.1 branch ASAP. > > > >Reindexing won't work, it would mean ho

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Joshua D. Drake
[EMAIL PROTECTED] wrote: On Fri, 1 Jun 2007, Joshua D. Drake wrote: Which databases ship with multi-master replication? I dunno, which ones? Which ones have robust and fully functional multi-master replication? (Oracle, MS SQL, not-PostgreSQL). You consider Oracle RAC fully functional mul

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Alexander Staubo
On 6/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I'm disappointed because SLONY-II has not been released yet to support multi-master replication! I wouldn't pin all my hopes on a project still under development. (For me, personally, add the fact that Slony-I still has not solved single-m

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Joshua D. Drake
Alexander Staubo wrote: On 6/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I'm disappointed because SLONY-II has not been released yet to support multi-master replication! I wouldn't pin all my hopes on a project still under development. (For me, personally, add the fact that Slony-I stil

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Csaba Nagy
[snip] > You don't need to reindex, just update. I was pretty sure I've seen the error reported and the fix too, the thing is relatively harmless except the vacuum troubles. And considering that the table itself does not need vacuuming, it would be even more harmless if it wouldn't block other stu

Re: [GENERAL] warm standby server stops doing checkpointsafterawhile

2007-06-01 Thread Teodor Sigaev
<2007-06-01 16:28:51.708 CEST:%> LOG: GIN incomplete split root:8 l:45303 r:111740 at redo CA/C8243C28 ... <2007-06-01 16:38:23.133 CEST:%> LOG: GIN incomplete split root:8 l:45303 r:111740 at redo CA/C8243C28 Looks like a bug in GIN. I'll play with it. Can you provide more details a

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Alexander Staubo
On 6/1/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: > In the meantime, Cybertec (http://www.postgresql.at/, an Austrian > company) just announced a commercial synchronous multimaster > replication product based on 2-phase commit. It's expensive, and I [snip] I could be completely cranked but

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Dave Page
Alexander Staubo wrote: > On 6/1/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: >> > In the meantime, Cybertec (http://www.postgresql.at/, an Austrian >> > company) just announced a commercial synchronous multimaster >> > replication product based on 2-phase commit. It's expensive, and I > [snip] >

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Joshua D. Drake
Dave Page wrote: Alexander Staubo wrote: On 6/1/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: In the meantime, Cybertec (http://www.postgresql.at/, an Austrian company) just announced a commercial synchronous multimaster replication product based on 2-phase commit. It's expensive, and I [snip

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Alvaro Herrera
Csaba Nagy wrote: > [snip] > > You don't need to reindex, just update. > > I was pretty sure I've seen the error reported and the fix too, the > thing is relatively harmless except the vacuum troubles. And considering > that the table itself does not need vacuuming, it would be even more > harmles

Re: [GENERAL] Slightly OT.

2007-06-01 Thread gonzales
It does so well because it KICKS ICE! On Fri, 1 Jun 2007, Joshua D. Drake wrote: Dave Page wrote: Alexander Staubo wrote: On 6/1/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: In the meantime, Cybertec (http://www.postgresql.at/, an Austrian company) just announced a commercial synchronous m

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Csaba Nagy
On Fri, 2007-06-01 at 17:40, Alvaro Herrera wrote: > Huh, why do you say that it doesn't need any vacuuming? This table is only inserted and rarely deleted, so other than the XID wraparound vacuuming it is not critical. Of course it will need vacuum finally, but it can survive months without it -

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Alvaro Herrera
Csaba Nagy wrote: > On Fri, 2007-06-01 at 17:40, Alvaro Herrera wrote: > > Huh, why do you say that it doesn't need any vacuuming? > > This table is only inserted and rarely deleted, so other than the XID > wraparound vacuuming it is not critical. Of course it will need vacuum > finally, but it ca

[GENERAL] Restoring 8.2 to 8.0

2007-06-01 Thread Robert Fitzpatrick
I have a dump from 8.2 restored to file that was pg_dump'd with format c from a production server. I want to know if it is possible for me to restore this to a 8.0 development server where I am not able to upgrade at this time. Trying to do some testing, but this is the only other server that's ava

Re: multimaster (was: [GENERAL] Slightly OT.)

2007-06-01 Thread gonzales
Let me clarify - I don't know how/where the thought is that I need something per se, I personally like deploying the scaled solutions and playing with software that others have written. Can I deploy the right hardware and configurations to meet pretty much near anything anyone could ever need?

Re: [GENERAL] warm standby server stops doingcheckpointsafterawhile

2007-06-01 Thread Simon Riggs
On Fri, 2007-06-01 at 19:11 +0400, Teodor Sigaev wrote: > > <2007-06-01 16:28:51.708 CEST:%> LOG: GIN incomplete split root:8 > > l:45303 r:111740 at redo CA/C8243C28 > ... > > <2007-06-01 16:38:23.133 CEST:%> LOG: GIN incomplete split root:8 > > l:45303 r:111740 at redo CA/C8243C28 > >

Re: [GENERAL] warm standby server stops doingcheckpointsafterawhile

2007-06-01 Thread Teodor Sigaev
I'd suggest we throw an error, as shown in the enclosed patch. Frank, can you give that a whirl to provide Teodor with something more to work with? Thanks. I already makes a test suite which reproduce the problem - it leaves incompleted splits. But I discover one more problem: deadlock on buf

[GENERAL] Seq Scan

2007-06-01 Thread Tyler Durden
Hi, I'm having some problems in performance in a simple select count(id) from I have 700 000 records in one table, and when I do: # explain select (id) from table_name; -[ RECORD 1 ] QUERY PLAN | Seq Scan on table_name (cost=0.0

multimaster (was: [GENERAL] Slightly OT.)

2007-06-01 Thread Andrew Sullivan
As an aside -- please don't start new topics in old threads. On Fri, Jun 01, 2007 at 10:42:02AM -0400, [EMAIL PROTECTED] wrote: > > I'm disappointed because SLONY-II has not been released yet to support > multi-master replication! Well, I wouldn't hold my breath. Most of the participants in

Re: [GENERAL] SQL Manager 2007 for PostgreSQL released

2007-06-01 Thread Tony Caduto
Guillaume Lelarge wrote: I asked them some time ago. They answered me this : As for SQL Manager for PostgreSQL - we regret to inform you that the development and support of Linux editions of EMS software products has become impossible now that Borland no longer supports Kylix libraries for Delph

Re: [GENERAL] Autovacuum keeps vacuuming a table disabled in pg_autovacuum

2007-06-01 Thread Csaba Nagy
> select age(datfrozenxid) from pg_database where datname = 'your database' > > 2 billions and you are screwed. Autovacuum starts panicking way before > that, to have enough slack. dbname=# select age(datfrozenxid) from pg_database where datname = 'dbname'; age 1648762992 (1 ro

Re: [GENERAL] why postgresql over other RDBMS

2007-06-01 Thread Bruce Momjian
PFC wrote: > On Thu, 31 May 2007 22:20:09 +0200, Vivek Khera <[EMAIL PROTECTED]> wrote: > > > > > On May 25, 2007, at 5:28 PM, Tom Lane wrote: > > > >> That's true at the level of DDL operations, but AFAIK we could > >> parallelize table-loading and index-creation steps pretty effectively > >> ---

Re: [GENERAL] warm standby server stops doingcheckpointsafterawhile

2007-06-01 Thread Simon Riggs
On Fri, 2007-06-01 at 09:22 -0700, Dhaval Shah wrote: > I am following this thread with interest and hence as a request if the > discussion is kept in this thread, is easier for me to follow it. > > Just recently I have put the WAL standby in production using 8.2.3 and > would like to know the cir

Re: [GENERAL] Seq Scan

2007-06-01 Thread John D. Burger
Tyler Durden wrote: I'm having some problems in performance in a simple select count(id) from I have 700 000 records in one table, and when I do: # explain select (id) from table_name; -[ RECORD 1 ] QUERY PLAN | Seq Scan on t

Re: [GENERAL] Seq Scan

2007-06-01 Thread Tyler Durden
Yes, either case happens the same. I'm come recently from MySQL and it works in a different way. I find strange that a simple SELECT COUNT(...) is so slow with only 700 000 records. Has been a nightmare optimizing this tables/queries. Sorry about this silly question, but I'm new to Posgresql. Th

[GENERAL] Looking for Graphical people for PostgreSQL tradeshow signage

2007-06-01 Thread Joshua D. Drake
Hello, We are looking to have new signage for the shows that PostgreSQL attends. The signage that we have decided on is here: http://www.displays2go.com/product.asp?ID=7371 We need artsy folk to help us design a sign that will make PostgreSQL look like the big bad player it is. The art req

Re: [GENERAL] shut down one database?

2007-06-01 Thread Erik Jones
On May 31, 2007, at 9:13 PM, Ottavio Campana wrote: Joshua D. Drake wrote: Ottavio Campana wrote: Bill Moran wrote: Ottavio Campana <[EMAIL PROTECTED]> wrote: I have postgresql running several databases. I can stop them all by stopping postgresql, but sometimes I'd like to shut down a sin

Re: [GENERAL] warm standby server stops doingcheckpointsafterawhile

2007-06-01 Thread Simon Riggs
On Fri, 2007-06-01 at 20:49 +0400, Teodor Sigaev wrote: > > I'd suggest we throw an error, as shown in the enclosed patch. Frank, > > can you give that a whirl to provide Teodor with something more to work > > with? Thanks. > > I already makes a test suite which reproduce the problem - it leaves

Re: [GENERAL] Seq Scan

2007-06-01 Thread Tyler Durden
Ok, my bad. But why this happens: # explain ANALYZE select id from table_name where id>20; QUERY PLAN

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Dudás József
Thanks your replies, these much help me. I am beginer in postgresql c function, sorry when I wrote stupid thinks too. This function not call from sql just from c code. So as I understand not need PG_FUNCTION_INFO_V1 macro. It is need in case I want to call routin direct from sql or make database

[GENERAL] New Live CD needed

2007-06-01 Thread Joshua D. Drake
Hello, We are going to need a new Live CD. I was hoping that we could have one with a 8.3Beta but... the only way that is going to happen is if we get a Beta (or Alpha) within 3 weeks. Any chance of that? If not, we need a new Live CD with 8.2.4. We need this, before the end of June please.

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Dudás József
Yes! You are right! Now must me find out how to convert char* to numeric datum and double to numeric datum and numeric datum to double :) =?ISO-8859-2?Q?Dud=E1s_J=F3zsef?= <[EMAIL PROTECTED]> writes: Just have problem with this conversion from TEXT - double - Datum ( NUMERIC ) where in TEX

Re: [GENERAL] Interval Rounding

2007-06-01 Thread Michael Glaesemann
On Jun 1, 2007, at 12:11 , Mike Ginsburg wrote: SELECT NOW() - change_time FROM ... to get the interval, and am attempting to use either EXTRACT() or DATE_PART() to get the appropriate value, but the interval doesn't contain any unit higher than days. It'd be helpful to me to see the res

Re: [GENERAL] Seq Scan

2007-06-01 Thread Michael Glaesemann
On Jun 1, 2007, at 12:24 , Tyler Durden wrote: On 6/1/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: Nothing. You have to scan the table because you aren't giving postgresql anything to use the index by. # explain ANALYZE select id from table_name where id>20;

Re: [GENERAL] Restoring 8.2 to 8.0

2007-06-01 Thread RW
I've never tried this but maybe it works if you use pg_dump from 8.0 to do the dump. Greetings Robert Robert Fitzpatrick wrote: I have a dump from 8.2 restored to file that was pg_dump'd with format c from a production server. I want to know if it is possible for me to restore this to a 8.0 dev

Re: [GENERAL] Seq Scan

2007-06-01 Thread Reece Hart
On Fri, 2007-06-01 at 18:24 +0100, Tyler Durden wrote: > It uses Index Scan for id>20 and Seq Scan for id>10?! Based on the statistics pg has for your table, and on the cost of using the index, the cost based optimizer decided that it's more efficient to seq scan all of the rows than to incu

Re: multimaster (was: [GENERAL] Slightly OT.)

2007-06-01 Thread Andrew Sullivan
On Fri, Jun 01, 2007 at 12:39:42PM -0400, [EMAIL PROTECTED] wrote: > ever need? I say yes, I can. BUT it would so much cooler IF, > there was a multi-master environment configured for the sake of > doing it. Yes, it would be. Unfortunately, when I was in the position where I had to explain to

Re: [GENERAL] Interval Rounding

2007-06-01 Thread Mike Ginsburg
age() is exactly what I needed. Now I just feel dumb for not looking into it. As far as getting the highest unit (day, month, year, etc) I am currently using CASES SELECT CASE WHEN (now() - change_time) < '1 min'::interval THEN date_part('seconds', age(now(), change_time))

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Jeff Davis
On Fri, 2007-06-01 at 17:00 +0200, Alexander Staubo wrote: > the projected Slony-II design, but the setup seems dead simple, and > from the docs I have found it seems to transparently replicate schema > changes, unlike Slony-I. So that's something. > To be fair to Slony-I, the fact that it does n

[GENERAL] Multiple customers sharing one database?

2007-06-01 Thread Rick Schumeyer
I'm developing an application that will be used by several independent customers. Conceptually, the data from one customer has no relation at all to another customer. In fact, each customer's data is private, and you would never combine data from different customers. I'm trying to decide whe

Re: multimaster (was: [GENERAL] Slightly OT.)

2007-06-01 Thread Alexander Staubo
On 6/1/07, Andrew Sullivan <[EMAIL PROTECTED]> wrote: These are all different solutions to different problems, so it's not surprising that they look different. This was the reason I asked, "What is the problem you are trying to solve?" You mean aside from the obvious one, scalability? The dat

Re: [GENERAL] warm standby server stops doingcheckpointsafterawhile

2007-06-01 Thread Teodor Sigaev
Found a reason: if parent page is fully backuped after child's split then forgetIncompleteSplit() isn't called at all. Hope, attached patch fix that. Pls, test it. PS I'm going away for weekend, so I'll not be online until Monday. -- Teodor Sigaev E-mail: [

Re: [GENERAL] multimaster

2007-06-01 Thread Joshua D. Drake
Alexander Staubo wrote: On 6/1/07, Andrew Sullivan <[EMAIL PROTECTED]> wrote: These are all different solutions to different problems, so it's not surprising that they look different. This was the reason I asked, "What is the problem you are trying to solve?" You mean aside from the obvious o

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Gregory Stark
Dudás József <[EMAIL PROTECTED]> writes: > Yes! You are right! Now must me find out how to convert char* to numeric datum > and double to numeric datum and numeric datum to double :) If you have a char* you can usually call a types input function which is usally "type_in" or "typein" like: Dir

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Alexander Staubo
On 6/1/07, Jeff Davis <[EMAIL PROTECTED]> wrote: On Fri, 2007-06-01 at 17:00 +0200, Alexander Staubo wrote: > the projected Slony-II design, but the setup seems dead simple, and > from the docs I have found it seems to transparently replicate schema > changes, unlike Slony-I. So that's something.

Re: [GENERAL] warm standby server stops doingcheckpointsafterawhile

2007-06-01 Thread Simon Riggs
On Fri, 2007-06-01 at 22:42 +0400, Teodor Sigaev wrote: > Found a reason: if parent page is fully backuped after child's split then > forgetIncompleteSplit() isn't called at all. i.e. full_page_writes = on > Hope, attached patch fix that. Pls, test it. > > PS I'm going away for weekend, so I'll

Re: [GENERAL] Multiple customers sharing one database?

2007-06-01 Thread Michael Glaesemann
On Jun 1, 2007, at 13:27 , Rick Schumeyer wrote: I'm developing an application that will be used by several independent customers. Conceptually, the data from one customer has no relation at all to another customer. In fact, each customer's data is private, and you would never combine da

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Joshua D. Drake
Alexander Staubo wrote: On 6/1/07, Jeff Davis <[EMAIL PROTECTED]> wrote: On Fri, 2007-06-01 at 17:00 +0200, Alexander Staubo wrote: > the projected Slony-II design, but the setup seems dead simple, and > from the docs I have found it seems to transparently replicate schema > changes, unlike Slon

Re: [GENERAL] table partitioning pl/pgsql helpers

2007-06-01 Thread Robert Treat
On Wednesday 30 May 2007 12:55, Enrico Sirola wrote: > Hello, > > I'm trying to write a trigger on insert which should insert the row > in another > table. The table on which to insert the row should be selected at > runtime and > it is not know in advance. For example, let's say we have a table wi

[GENERAL] ERROR: domain domain1 does not allow null values

2007-06-01 Thread Юдыцкий Игорь Владислав ович
Hello. I've found unexpected behavior of PostgreSQL 8.2.3 CREATE DOMAIN "public"."domain1" AS integer NOT NULL; CREATE TABLE "public"."table1" ("field1" "public"."domain1") WITH OIDS; CREATE OR REPLACE FUNCTION "public"."function1" () RETURNS text AS $body$ declare a public.table1%ROWTYPE; beg

[GENERAL] synchronisation with news.fr.postgresql.org?

2007-06-01 Thread stig erikson
Hi. What happened to the synchronization of news servers between news.postgresql.org and news.fr.postgresql.org. the latter is there, but the groups are empty. this is very sad since that server was very quick for us living in Europe. is it only a temporary problem or is it removed for some reas

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Dudás József
This is the debug of last varcharout routine: Breakpoint 1, varcharout (fcinfo=0xbf8a1e7c) at varchar.c:441 441 VarChar*s = PG_GETARG_VARCHAR_P(0); 440 { (gdb) print fcinfo $25 = (FunctionCallInfo) 0xbf8a1e7c 441 VarChar*s = PG_GETARG_VARCHAR_P(0); 446

[GENERAL] what happened with the news servers?

2007-06-01 Thread stig erikson
Hi. i am looking at the news (NNTP) servers news.postgresql.org and news.fr.postgresql.org, they both seem pretty empty. what happened? stig ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] collision in serial numbers after INSERT?

2007-06-01 Thread lawpoop
Hello all - I'm working on a site with PHP and Postgres, coming from a MySQL background. I was looking for an equivalent to the mysql_insert_id() function, and a site recommended this: function postg_insert_id($tablename, $fieldname) { global connection_id; $result=pg_exec($connection_id, "SEL

Re: [GENERAL] warm standby server stops doing checkpointsafterawhile

2007-06-01 Thread Dhaval Shah
I am following this thread with interest and hence as a request if the discussion is kept in this thread, is easier for me to follow it. Just recently I have put the WAL standby in production using 8.2.3 and would like to know the circumstances where I will need to upgrade. Hence the interest. R

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Dudás József
Thank you and other helpfully peoples the interest about my first steps in your world. I learned more than I hope. This function work fine now. Can you to offer me place where I find these information, because I read the postgresql source code to find these macros. Regards, Josef Dudás Józ

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Andrew Sullivan
On Fri, Jun 01, 2007 at 08:57:36PM +0200, Alexander Staubo wrote: > I fail to see how that's an excuse not to replicate DDL. If I run > "alter table" on the master, there is no reason whatever that this > command cannot be executed on all the slaves -- which is what I would > expect of a replicatio

Re: [GENERAL] Interval Rounding

2007-06-01 Thread Michael Glaesemann
On Jun 1, 2007, at 13:00 , Mike Ginsburg wrote: age() is exactly what I needed. Now I just feel dumb for not looking into it. As far as getting the highest unit (day, month, year, etc) I am currently using CASES SELECT CASE WHEN (now() - change_time) < '1 min'::interva

  1   2   >