Re: [GENERAL] Asking advice on speeding up a big table

2006-04-09 Thread Tom Lane
[EMAIL PROTECTED] writes: > I have a simple benchmark which runs too slow on a 100M row table, and > I am not sure what my next step is to make it faster. The EXPLAIN ANALYZE you showed ran in 32 msec, which ought to be fast enough for anyone on that size table. You need to show us data on the pr

[GENERAL] Asking advice on speeding up a big table

2006-04-09 Thread felix
I have a simple benchmark which runs too slow on a 100M row table, and I am not sure what my next step is to make it faster. It's a simple setup, part of a larger system. There are three data tables, each with a BIGINT id and a data column of dofferent types. There is a fourth table with BIGINT f

Re: [GENERAL] Postgresql with Access 97

2006-04-09 Thread Shoaib Mir
You can try SQL_ASCII encoding in the following way in PostgreSQL:CREATE DATABASE test  WITH ENCODING='SQL_ASCII';In the past I have used this good tool for conversion between Access and PostgreSQL. You can give it a try as well http://www.data-conversions.net/access-to-postgresql-pro-converter.htm

Re: [GENERAL] Is difference between PostgreSQL and mySQL licences

2006-04-09 Thread Joshua D. Drake
applications are not GPL. It's mostly commercial apps that end up getting the license because businesses fear lawsuits more than individuals do (something like music "piracy" in which end users copying a CD to their disk drives are much less likely to be sued than if you produce products that

Re: [GENERAL] advice on schema for multilingual text

2006-04-09 Thread Michael Glaesemann
On Apr 9, 2006, at 0:31 , Daniel McBrearty wrote: Hi I have a website that has multilingual text stored in the database. Currently I just have a flat table (lets called it "translations"), one row per text item, one column per language. This works OK, for now, but I am looking at a redes

Re: [GENERAL] pl/perl error

2006-04-09 Thread Tom Lane
Frank <[EMAIL PROTECTED]> writes: > I have a perl script running as a daemon. It's using DBD::Pg (1.43) to > connect to my Postgres server (8.0.7) running on the same box and talking > over a socket. When I start the server, it runs fine for about a day, and > then at some point I start getting t

Re: [GENERAL] pl/perl error

2006-04-09 Thread Douglas McNaught
Frank <[EMAIL PROTECTED]> writes: > I have a perl script running as a daemon. It's using DBD::Pg (1.43) to > connect to my Postgres server (8.0.7) running on the same box and talking > over a socket. When I start the server, it runs fine for about a day, and > then at some point I start getting

Re: [GENERAL] Debian package for freeradius_postgresql module

2006-04-09 Thread Tyler MacDonald
Chris Travers <[EMAIL PROTECTED]> wrote: > > I'd call that the short term solution, with the long term solution > >being to finally convince the right people to remove that clause from > >OpenSSL's license. > As I have said before, I think it is Debian's problem at least from the > perspectiv

[GENERAL] Postgresql with Access 97

2006-04-09 Thread zagman
Hi all, I'm trying to migrate to a postgresql server backend with an existing Access 97 application. However Access 97 crashes all the time if I update any records The error I see says something about "SQL_ASCI" encoding when I look at the error report that Access generates to send to Microsoft.

[GENERAL] pl/perl error

2006-04-09 Thread Frank
I have a perl script running as a daemon. It's using DBD::Pg (1.43) to connect to my Postgres server (8.0.7) running on the same box and talking over a socket. When I start the server, it runs fine for about a day, and then at some point I start getting this error repeatedly: DBD::Pg::db do fail

Re: [GENERAL] Debian package for freeradius_postgresql module

2006-04-09 Thread Chris Travers
Tyler MacDonald wrote: Martijn van Oosterhout wrote: I'd call that the short term solution, with the long term solution being to finally convince the right people to remove that clause from OpenSSL's license. As I have said before, I think it is Debian's problem at least f

Re: [GENERAL] Expression matching related question

2006-04-09 Thread Tom Lane
Peter Hoskin <[EMAIL PROTECTED]> writes: > I wish to do a query such as: > SELECT * FROM table WHERE column='something' AND column2='something > else' AND (network='0' OR (left=0 AND network>0)); > However, when I execute this in phppgadmin I'm told there is an error > around the = character in

[GENERAL] advice on schema for multilingual text

2006-04-09 Thread Daniel McBrearty
HiI have a website that has multilingual text stored in the database. Currently I just have a flat table (lets called it "translations"), one row per text item, one column per language. This works OK, for now, but I am looking at a redesign. Mostly I want to keep information about the languages in

Re: [GENERAL] Expression matching related question

2006-04-09 Thread Michael Fuhr
On Mon, Apr 10, 2006 at 06:23:01AM +1000, Peter Hoskin wrote: > I wish to do a query such as: > SELECT * FROM table WHERE column='something' AND column2='something > else' AND (network='0' OR (left=0 AND network>0)); > > However, when I execute this in phppgadmin I'm told there is an error > aro

Re: [GENERAL] Expression matching related question

2006-04-09 Thread Peter Hoskin
I should of mentioned, left is a bigint and network is an integer Peter Hoskin wrote: Hi, I wish to do a query such as: SELECT * FROM table WHERE column='something' AND column2='something else' AND (network='0' OR (left=0 AND network>0)); However, when I execute this in phppgadmin I'm told t

Re: [GENERAL] Date & Time with time zone

2006-04-09 Thread Martijn van Oosterhout
On Sun, Apr 09, 2006 at 12:07:50PM -0800, Wei Wei wrote: > I try to understand how the D&T information is stored/presented in PG. In the > application, the data is reported as > > Sun Apr 09 12:40:52 PDT 2006 - Pacific Standard Time > > But, in the DB, it is stated as > > 2006-04-09 14:40:53.09

[GENERAL] Expression matching related question

2006-04-09 Thread Peter Hoskin
Hi, I wish to do a query such as: SELECT * FROM table WHERE column='something' AND column2='something else' AND (network='0' OR (left=0 AND network>0)); However, when I execute this in phppgadmin I'm told there is an error around the = character in left=0. Can't seem to figure the syntax. H

Re: [GENERAL] "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )

2006-04-09 Thread Milen Kulev
Great hint Tom! pg_restore -C -Fc -d template1 < tdb1b.bak Did the job. Actually if I specify any other database I am getting the same result ;) I wanted to use custom (-Fc) option to backup BLOB files. Why should I use the output of pg_restore to restore my BLOBs (if it is possible at all)?

[GENERAL] Date & Time with time zone

2006-04-09 Thread Wei Wei
I try to understand how the D&T information is stored/presented in PG. In the application, the data is reported as Sun Apr 09 12:40:52 PDT 2006 - Pacific Standard Time But, in the DB, it is stated as 2006-04-09 14:40:53.093-07 It doesn't seen right to me. Both are on the same box and the date

Re: [GENERAL] "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )

2006-04-09 Thread Tom Lane
"Milen Kulev" <[EMAIL PROTECTED]> writes: >> I am getting the commands you mention: >> pg_restore -C -Fc tdb1b.bak 1> OUT >> Less OUT: >> CREATE DATABASE testdb1 WITH TEMPLATE = template0 ENCODING = 'UTF8' >> TABLESPACE = tbs1; ALTER DATABASE testdb1 OWNER TO pg; \connect >> testdb1 ... >> ,

Re: [GENERAL] "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )

2006-04-09 Thread Milen Kulev
Hi Tom, There are no error messages repored. Neiter in the logfile of the server, nor on The tty , which I am issuing the commands from. I am not switching the OS user (all commands are entered interactively, no cron jobs, shell scripts etc). Regeards, Milen -Original Message- From:

Re: [GENERAL] Is difference between PostgreSQL and mySQL licences

2006-04-09 Thread David Wall
That doesn't sound consistent with the arrangements that MySQL AB expect for commercial users of their products. They indicate assortedly that: - If you are developing and distributing open source applications under the GPL, or some OSI-approved license, you are free to use MySQL(tm) "for

Re: [GENERAL] Is difference between PostgreSQL and mySQL licences for client application minor only

2006-04-09 Thread Christopher Browne
In the last exciting episode, "Andrus" <[EMAIL PROTECTED]> wrote: > I created closed source Postgres/mySQL client application. > > When using PostgreSQL as backend I can include Postgres server > binary code in my application distro. > > When using mySQL my application setup can load mySQL server >

Re: [GENERAL] Is difference between PostgreSQL and mySQL licences for client application minor only

2006-04-09 Thread Tom Lane
"Andrus" <[EMAIL PROTECTED]> writes: > I created closed source Postgres/mySQL client application. > When using PostgreSQL as backend I can include Postgres server binary code > in my application distro. > When using mySQL my application setup can load mySQL server installation > package from mysq

[GENERAL] SSL for an AIX 5.x client - possible?

2006-04-09 Thread paul rivers
  I am having difficulty getting SSL-enabled Postgres client libs working on AIX with either vac or gcc using OpenSSL.  SSL from other UNIX flavors has not been a problem.    Versions in question:  AIX 5.1 on power4  OpenSSL 0.9.8  Postgres 8.1.3   I am not that familiar (yet) wit

Re: [GENERAL] index growth

2006-04-09 Thread Tom Lane
Alex Mayrhofer <[EMAIL PROTECTED]> writes: > a recent REINDEX reduced that index from about 3 pages to 18000. That's not bloat, that's normal overhead. The traditional rule of thumb for a btree is that at steady state, pages will be about 2/3rds full. REINDEX packs pages to 90% IIRC, but you

Re: [GENERAL] Load testing across 2 machines

2006-04-09 Thread Gavin Hamill
On Sun, 09 Apr 2006 17:00:14 +0100 Simon Riggs <[EMAIL PROTECTED]> wrote: > On Sat, 2006-04-08 at 15:10 +0100, Gavin Hamill wrote: > > > SELECTS go to *both* live and test, but only the answers from live > > are sent back to clients - the answers from test are discarded... > > Put log_min_durat

Re: [GENERAL] "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )

2006-04-09 Thread Tom Lane
"Milen Kulev" <[EMAIL PROTECTED]> writes: > I am getting the commands you mention: > pg_restore -C -Fc tdb1b.bak 1> OUT > Less OUT: > CREATE DATABASE testdb1 WITH TEMPLATE = template0 ENCODING = 'UTF8' > TABLESPACE = tbs1; > ALTER DATABASE testdb1 OWNER TO pg; > \connect testdb1 > ... > , b

Re: [GENERAL] "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )

2006-04-09 Thread Milen Kulev
Hello Tom, I am getting the commands you mention: pg_restore -C -Fc tdb1b.bak 1> OUT Less OUT: CREATE DATABASE testdb1 WITH TEMPLATE = template0 ENCODING = 'UTF8' TABLESPACE = tbs1; ALTER DATABASE testdb1 OWNER TO pg; \connect testdb1 ... , but testdb1 is NOT created ! That is actually my

[GENERAL] Is difference between PostgreSQL and mySQL licences for client application minor only

2006-04-09 Thread Andrus
I created closed source Postgres/mySQL client application. When using PostgreSQL as backend I can include Postgres server binary code in my application distro. When using mySQL my application setup can load mySQL server installation package from mysql website and execute it automatically. This

Re: [GENERAL] Debian package for freeradius_postgresql module

2006-04-09 Thread Tyler MacDonald
Martijn van Oosterhout wrote: > To save you some time: this has been rehashed on the OpenSSL lists and > the conclusion is basically: > > 1. It's not a problem, it's the GPLs problem > 2. It doesn't appear they can change the licence for some reason > > We are not the first people to run into th

Re: [GENERAL] Debian package for freeradius_postgresql module

2006-04-09 Thread Martijn van Oosterhout
On Sun, Apr 09, 2006 at 10:26:35AM -0700, Tyler MacDonald wrote: > Well, Alan DeKok, the creator of freeradius, has said that he has no > problem altering the license, but other contributors to the project have > raised some concerns. I guess we'll just wait and see how it all pans out. > One

Re: [GENERAL] Load testing across 2 machines

2006-04-09 Thread Joshua D. Drake
Gavin Hamill wrote: On Sun, 09 Apr 2006 17:00:14 +0100 Simon Riggs <[EMAIL PROTECTED]> wrote: Sniff the live log for SELECT statements (plus their live durations), Wow, how wonderfully low-tech - hence it's right up my street :) Yay, some tail + psql fun coming up! You can even tell it to o

Re: [GENERAL] index growth

2006-04-09 Thread Alex Mayrhofer
Tom Lane wrote: > Alex Mayrhofer <[EMAIL PROTECTED]> writes: >> i have a bunch of indices over rather frequently updated large tables. Those >> indices grow in size with the updates, so i frequently re-index them. > > That usually shouldn't be necessary since PG 7.4 or so. Do you have > some stra

Re: [GENERAL] Strange syntax for create/drop index

2006-04-09 Thread Haris Peco
Michael, You have name A for 'create index' and name B for 'drop index' I can think that it isn't same index This is illogically for me make object with name A and drop it with name B > If the schema was allowed, some people would infer that they > can place the index in a schema other tha

Re: [GENERAL] Debian package for freeradius_postgresql module

2006-04-09 Thread Tyler MacDonald
Stephen Frost <[EMAIL PROTECTED]> wrote: > GPL-licensed software depending on a BSD-licensed package *isn't* a > problem. If we didn't link Postgres w/ OpenSSL this wouldn't be any > issue at all. If the freeradius authors explicitly say they don't have > a problem linking against a BSD-with-adve

Re: [GENERAL] Load testing across 2 machines

2006-04-09 Thread Gavin Hamill
On Sun, 09 Apr 2006 17:00:14 +0100 Simon Riggs <[EMAIL PROTECTED]> wrote: > Sniff the live log for SELECT statements (plus their live durations), Wow, how wonderfully low-tech - hence it's right up my street :) Yay, some tail + psql fun coming up! Cheers, Gavin. ---(end

Re: [GENERAL] index growth

2006-04-09 Thread Tom Lane
Alex Mayrhofer <[EMAIL PROTECTED]> writes: > i have a bunch of indices over rather frequently updated large tables. Those > indices grow in size with the updates, so i frequently re-index them. That usually shouldn't be necessary since PG 7.4 or so. Do you have some strange pattern of index key u

Re: [GENERAL] "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )

2006-04-09 Thread Tom Lane
"Milen Kulev" <[EMAIL PROTECTED]> writes: > My case : I have a DB, that I have archived with > pg_dump -C -Fc -d testdb1 > tdb1b.bak > Then I am dropping the database testdb1 ( with DROP DATABASE testdb1; ) I > want to recover it. When I issue the following > command: > pg_restore -C -Fc tdb1

Re: [GENERAL] Load testing across 2 machines

2006-04-09 Thread Simon Riggs
On Sat, 2006-04-08 at 15:10 +0100, Gavin Hamill wrote: > SELECTS go to *both* live and test, but only the answers from live are > sent back to clients - the answers from test are discarded... Put log_min_duration_statement = 0 so all SELECTs go to the log. Sniff the live log for SELECT statemen

Re: [GENERAL] Create database bug in 8.1.3 ? -> solved

2006-04-09 Thread Tom Lane
Douglas McNaught <[EMAIL PROTECTED]> writes: > "Milen Kulev" <[EMAIL PROTECTED]> writes: >> I can not understand why pg_dump, pg_dumpall have hard-coded "template0" ? > The reason is this: any extra stuff that your database inherited from > template1 (or whatever template you used) will be dumped

Re: [GENERAL] how to document database

2006-04-09 Thread Merlin Moncure
On 4/7/06, Ottavio Campana <[EMAIL PROTECTED]> wrote: > I need to document the database I develop so that other people can > easily understand how it works. Another tool to do this is the EMS postgresql manager. It is not a free tool but it produces absolutely gorgeous html documentation. The w

Re: [GENERAL] Create database bug in 8.1.3 ? -> solved

2006-04-09 Thread Milen Kulev
Hi Dough, Thank you for your answer. Now the reasons for using template0 DB are pretty clear (there a mini test-case Of this in the mail you have just answered;)). Thanks again. Regards. Milen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Mc

Re: [GENERAL] Create database bug in 8.1.3 ? -> solved

2006-04-09 Thread Douglas McNaught
"Milen Kulev" <[EMAIL PROTECTED]> writes: > Hi Wiliam, > Than you very much for your prompt reply. > > I can not understand why pg_dump, pg_dumpall have hard-coded "template0" ? The reason is this: any extra stuff that your database inherited from template1 (or whatever template you used) will b

[GENERAL] "Pg_restore -C" is not creating a database ( Was Create database bug in 8.1.3 ? )

2006-04-09 Thread Milen Kulev
Hi Listers, My saga contunues ;( I can not get pg_restore working as expected (as described in the documentation). My case : I have a DB, that I have archived with pg_dump -C -Fc -d testdb1 > tdb1b.bak Then I am dropping the database testdb1 ( with DROP DATABASE testdb1; ) I want to recov

Re: [GENERAL] Create database bug in 8.1.3 ? -> solved

2006-04-09 Thread Milen Kulev
Hi Wiliam, Than you very much for your prompt reply. I can not understand why pg_dump, pg_dumpall have hard-coded "template0" ? In my case I haven't modified template1 DB ( e.g. template0 equals template1 DB), so it Doesn't mater for me, bit I am still wondering ... ;( . The documentation is s

Re: [GENERAL] Create database bug in 8.1.3 ?

2006-04-09 Thread William ZHANG
The backend doesnot save the name of the template database used by "CREATE DATABASE". pg_dump, pg_dumpall have hard code like this: appendPQExpBuffer(buf, " WITH TEMPLATE = template0"); That's why you found the template database is always `template0`. If the backend saves the name of the temp

[GENERAL] index growth

2006-04-09 Thread Alex Mayrhofer
Hi, i have a bunch of indices over rather frequently updated large tables. Those indices grow in size with the updates, so i frequently re-index them. Are there any plans to add REINDEX estimation/jobs to the autovacuum process - or, alternatively, any options on reducing the growth rate of those

[GENERAL] Create database bug in 8.1.3 ?

2006-04-09 Thread Milen Kulev
Hi Listers, I have the following problem (OS= RHELU2 , PG version= 8.1.3) when I try to Create a database : postgres=# CREATE DATABASE world3 TEMPLATE=template1 ENCODING='UTF8' TABLESPACE=tbs1 ; CREATE DATABASE Then I am backup-ing the database (a small toy DB) with pg_dumpall: pg_dumpa