Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Amitabh Kant
On Sun, Nov 20, 2011 at 1:12 PM, Phoenix Kiula wrote: > > > Another idea. > > I use CSF/LFD firewall. > > For TCP_IN, I have enabled "6432" port number. > > Do I also need to enable it elsewhere, such as TCP_OUT or UDP_IN etc? > Could you just try disabling the firewall for once? Amitabh

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread John R Pierce
On 11/19/11 11:42 PM, Phoenix Kiula wrote: I use CSF/LFD firewall. For TCP_IN, I have enabled "6432" port number. Do I also need to enable it elsewhere, such as TCP_OUT or UDP_IN etc? does this firewall block localhost at all? many don't. (I'm not at all familiar with this CSF/LFD thing)

Re: [GENERAL] How to install latest stable postgresql on Debian

2011-11-20 Thread Andrus
Scott, Thank you. Just add them to the bottom then run sudo sysctl -p to make them take effect. It seems that if this value is greater than RAM, linux kerner silently uses max possible value. Linuxes are used mostly to run PostgreSql only but ram may vary depending on virtual maschine confi

Re: [GENERAL] invalid byte sequence for encoding "UTF8": 0x00

2011-11-20 Thread hubert depesz lubaczewski
On Sat, Nov 19, 2011 at 09:32:12AM -0800, pawel_kukawski wrote: > Is there any way I can store NULL character (\u) in string ? > > Or there is only one option that I have change every text field to bytea. correct question is: why do you want to store \u in text field? Best regards, depe

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Phoenix Kiula
On Sun, Nov 20, 2011 at 4:49 PM, John R Pierce wrote: > On 11/19/11 11:42 PM, Phoenix Kiula wrote: > > does this firewall block localhost at all?  many don't.  (I'm not at all > familiar with this CSF/LFD thing) > > if you enable a port for TCP_IN, does it automatically allow replies back? > > pos

[GENERAL] Adding 1 week to a timestamp, which can be NULL or expired

2011-11-20 Thread Alexander Farber
Hello, I'm trying to add 1 week "VIP-status" to all users in a table: update pref_users set vip = max(vip, now()) + interval '1 week'; but max() doesn't work with timestamps. Is there maybe still a way to solve it with a one-liner? Thank you Alex -- Sent via pgsql-general mailing list (pg

Re: [GENERAL] Adding 1 week to a timestamp, which can be NULL or expired

2011-11-20 Thread John R Pierce
On 11/20/11 2:32 AM, Alexander Farber wrote: update pref_users set vip = max(vip, now()) + interval '1 week'; but max() doesn't work with timestamps. max works fine with timestamps... however, its a 1 argument function that takes an aggregate as its argument. you perhaps want GREATEST(v

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Marko Kreen
On Sun, Nov 20, 2011 at 8:32 AM, Phoenix Kiula wrote: > The password I am entering in the terminal is right for sure. I've > tried it a few times, checked the caps lock, etc. Also, if the log > carries this "FATAL password authentication failed", why does the > terminal give the vague error "no wo

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Scott Mead
On Sun, Nov 20, 2011 at 6:21 AM, Marko Kreen wrote: > On Sun, Nov 20, 2011 at 8:32 AM, Phoenix Kiula > wrote: > > The password I am entering in the terminal is right for sure. I've > > tried it a few times, checked the caps lock, etc. Also, if the log > > carries this "FATAL password authenticat

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Phoenix Kiula
On Sun, Nov 20, 2011 at 7:43 PM, Scott Mead wrote: > > > On Sun, Nov 20, 2011 at 6:21 AM, Marko Kreen wrote: >> >> On Sun, Nov 20, 2011 at 8:32 AM, Phoenix Kiula >> wrote: >> > The password I am entering in the terminal is right for sure. I've >> > tried it a few times, checked the caps lock, et

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Phoenix Kiula
On Sun, Nov 20, 2011 at 7:52 PM, Phoenix Kiula wrote: > On Sun, Nov 20, 2011 at 7:43 PM, Scott Mead wrote: >> >> >> On Sun, Nov 20, 2011 at 6:21 AM, Marko Kreen wrote: >>> >>> On Sun, Nov 20, 2011 at 8:32 AM, Phoenix Kiula >>> wrote: >>> > The password I am entering in the terminal is right for

Re: [GENERAL] 0.0.0.0 addresses in postgresql.conf on Windows

2011-11-20 Thread deepak
Hi! This seems to be the problem on Windows 2008 server, though starting with '0.0.0.0' on Windows 2003 server worked fine. I tried turning off IPv6 on the 2008 server to see if that has a effect, but it still behaved the same way after that change. Please let me know if you have any thoughts on

Re: [GENERAL] Huge number of INSERTs

2011-11-20 Thread Phoenix Kiula
On Sun, Nov 20, 2011 at 2:11 PM, Tomas Vondra wrote: > Dne 18.11.2011 13:30, Phoenix Kiula napsal(a): >> Full DB:   32GB >> The big table referenced above:  28 GB >> >> It's inserts into this one that are taking time. > > Hm, in that case the shared_buffers is probably too low. It'd be nice to > h

[GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Phoenix Kiula
Hi. Want to start another thread, loosely related to the performance problems thread I have going. Need some DB design guidance from the gurus here. My big table now has about 70 million rows, with the following columns: alias | character varying(35) url | text modify_

[GENERAL] 9.1.1 build failure : postgres link fails

2011-11-20 Thread Rob Sargentg
I just got round to updating my laptop to ubuntu-10.4 (32bit), in part because I kept hitting snags while trying to configure postgres 9.1.1. The upgrade did in fact solve the dependency issues (though I was surprised UUID came along with out the ossp specific impl??) but the build is having

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Phoenix Kiula
On Sun, Nov 20, 2011 at 9:33 PM, Phoenix Kiula wrote: > Hi. > > Want to start another thread, loosely related to the performance > problems thread I have going. > > Need some DB design guidance from the gurus here. > > My big table now has about 70 million rows, with the following columns: > > >  

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Gregg Jaskiewicz
partition your table if it is too big. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread David Johnston
On Nov 20, 2011, at 8:33, Phoenix Kiula wrote: > Hi. > > Want to start another thread, loosely related to the performance > problems thread I have going. > > Need some DB design guidance from the gurus here. > > My big table now has about 70 million rows, with the following columns: > > > al

Re: [GENERAL] 9.1.1 build failure : postgres link fails

2011-11-20 Thread Tom Lane
Rob Sargentg writes: > I just got round to updating my laptop to ubuntu-10.4 (32bit), in part > because I kept hitting snags while trying to configure postgres 9.1.1. > ubuntu-10.4 is not the latest of course and comes with gnu make 3.8.1, > but it seems to compile everything then fails to link

Re: [GENERAL] 9.1.1 build failure : postgres link fails

2011-11-20 Thread Rob Sargent
On 11/20/2011 09:24 AM, Tom Lane wrote: > Rob Sargentg writes: >> I just got round to updating my laptop to ubuntu-10.4 (32bit), in part >> because I kept hitting snags while trying to configure postgres 9.1.1. >> ubuntu-10.4 is not the latest of course and comes with gnu make 3.8.1, >> but it

Re: [GENERAL] 9.1.1 build failure : postgres link fails

2011-11-20 Thread Tom Lane
Rob Sargent writes: > On 11/20/2011 09:24 AM, Tom Lane wrote: >> It appears that on Ubuntu, libbsd defines those symbols, which confuses >> configure into supposing that they're provided by libc, and then the >> link fails because libbsd isn't actually linked into the postmaster. >> The question i

[GENERAL] How to install pgfincore with PG 9.1

2011-11-20 Thread Raghavendra
Respected, I have tried installing pgfincore with PG 9.1(one-click installer). But facing below error. [root@localhost pgfincore-v1.1]# export PATH=/opt/PostgreSQL/9.1/bin:$PATH [root@localhost pgfincore-v1.1]# echo $PATH /opt/PostgreSQL/9.1/bin:/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:

[GENERAL] Significant Digits in Floating Point Datatype

2011-11-20 Thread Lee Hachadoorian
I would like to store some in a single array some data that is conceptually related, but some of the data is floating point, and some of it is integer. Obviously the integer data *can* be stored as double precision, but I need to know about potential loss of precision. Double precision has "a p

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Scott Marlowe
On Sun, Nov 20, 2011 at 4:52 AM, Phoenix Kiula wrote: > How can I debug that the connections are the problem? Take a look at pg_stat_activity, specifically the fields client_addr, client_port, and client_hostname. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch

Re: [GENERAL] Significant Digits in Floating Point Datatype

2011-11-20 Thread Tom Lane
Lee Hachadoorian writes: > And can I reliably retrieve the original integer by > casting to int (or bigint) if the number of digits in the original > integer is less than 15? On IEEE-floating-point machines, I'd expect float8 to store integers up to 2^52 (or maybe it's 2^53) exactly. With othe

Re: [GENERAL] How to install pgfincore with PG 9.1

2011-11-20 Thread Cédric Villemain
2011/11/20 Raghavendra : > Respected, > I have tried installing pgfincore with PG 9.1(one-click installer). But > facing below error. > [root@localhost pgfincore-v1.1]# export PATH=/opt/PostgreSQL/9.1/bin:$PATH > [root@localhost pgfincore-v1.1]# echo $PATH > /opt/PostgreSQL/9.1/bin:/usr/lib/qt-3.3/

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Adrian Klaver
On Sunday, November 20, 2011 7:12:59 am Phoenix Kiula wrote: > On Sun, Nov 20, 2011 at 9:33 PM, Phoenix Kiula wrote: > > I thought of adding a bigserial (serial8) column instead of > varchar(32) for the md5. But postgresql tells me that: > > -- > ERROR: type "bigserial" does not exist > -- >

Re: [GENERAL] Significant Digits in Floating Point Datatype

2011-11-20 Thread Bill Moran
On 11/20/11 1:29:37 PM, Lee Hachadoorian wrote: I would like to store some in a single array some data that is conceptually related, but some of the data is floating point, and some of it is integer. Obviously the integer data *can* be stored as double precision, but I need to know about potentia

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Adrian Klaver
On Sunday, November 20, 2011 3:56:18 am Phoenix Kiula wrote: > > Any ideas? > > Just to add, the connection string I try for pgbouncer is EXACTLY the > same as the one I use to connect directly to PG, but I add the port > number. That may be the problem. The Postgres server and pgbouncer are no

[GENERAL] FOSDEM 2012 - PostgreSQL Devroom: Call for Speakers

2011-11-20 Thread Andreas 'ads' Scherbaum
Hi all, FOSDEM 2012 - PostgreSQL Devroom: Call for Speakers The PostgreSQL project will have a Devroom at FOSDEM 2012, which takes place on February 4-5 in Brussels, Belgium. The Devroom will mainly cover topics for PostgreSQL users, developers and contributors. For more information about t

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Gavin Flower
On 21/11/11 02:33, Phoenix Kiula wrote: Hi. Want to start another thread, loosely related to the performance problems thread I have going. Need some DB design guidance from the gurus here. My big table now has about 70 million rows, with the following columns: alias | character v

Re: [GENERAL] Is it ever necessary to vacuum a table that only gets inserts/updates?

2011-11-20 Thread Gavin Flower
On 20/11/11 11:57, Scott Marlowe wrote: On Sat, Nov 19, 2011 at 12:53 PM, Gavin Flower wrote: On 19/11/11 11:32, Adam Cornett wrote: On Fri, Nov 18, 2011 at 2:56 PM, Gavin Flower wrote: On 18/11/11 04:59, Tom Lane wrote: Craig Ringerwrites: On Nov 17, 2011 1:32 PM, "Tom Lane"wrot

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Phoenix Kiula
On Mon, Nov 21, 2011 at 4:13 AM, Adrian Klaver wrote: > On Sunday, November 20, 2011 3:56:18 am Phoenix Kiula wrote: > >> > Any ideas? >> >> Just to add, the connection string I try for pgbouncer is EXACTLY the >> same as the one I use to connect directly to PG, but I add the port >> number. > > >

Re: [GENERAL] Huge number of INSERTs

2011-11-20 Thread Tomas Vondra
Dne 20.11.2011 13:46, Phoenix Kiula napsal(a): > On Sun, Nov 20, 2011 at 2:11 PM, Tomas Vondra wrote: > For a moment there, I unleashed the valve and allowed the INSERT > functionality. The log was immediately flooded with this: > > > LOG: duration: 6851.054 ms statement: select nextval('main

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Tomas Vondra
Dne 20.11.2011 12:52, Phoenix Kiula napsal(a): > You may be on to something. And the queries results are below. (5 > connections are reserved for "superusers" so you may be right.) > > > MYDB=# show max_connections; > max_connections > - > 150 > (1 row) > > Time: 0.517 ms > >

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Tomas Vondra
Dne 21.11.2011 01:39, Phoenix Kiula napsal(a): > On Mon, Nov 21, 2011 at 4:13 AM, Adrian Klaver > wrote: >> On Sunday, November 20, 2011 3:56:18 am Phoenix Kiula wrote: >> Any ideas? >>> >>> Just to add, the connection string I try for pgbouncer is EXACTLY the >>> same as the one I use to co

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Tomas Vondra
Dne 20.11.2011 03:33, Amitabh Kant napsal(a): > On Sun, Nov 20, 2011 at 4:14 AM, Phoenix Kiula > Does the auth file (/var/lib/pgsql/pgbouncer.txt) contain valid login > credentials to your database? If I remember correctly, it should have > the username and password to your database. No, it shou

Re: [GENERAL] upgrading from 8.3 to 9.0

2011-11-20 Thread Robert Treat
You could also look into upgrading via pg_upgrade, if you don't want to go through the dump/restore cycle. Even in that case if you can do a test of pg_dump (one for schema, one for data) and make sure it loads into the new db without any issues. 8.3 -> 9.0 is pretty harmless (you might want to thi

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Tomas Vondra
Dne 20.11.2011 04:15, Phoenix Kiula napsal(a): > I just did some testing. > > If the password is wrong, then it shows me the "authentication failed" > message right in the terminal window, immediately. > > If the password is correct (plain text or md5 of that plain text -- > both have similar req

Re: [GENERAL] Incremental backup with RSYNC or something?

2011-11-20 Thread Robert Treat
On Mon, Nov 14, 2011 at 12:45 AM, Venkat Balaji wrote: >> Question: what can I do to rsync only the new additions in every table >> starting 00:00:01 until 23:59:59 for each day? > > A table level replication (like Slony) should help here. > Or > A trigger based approach with dblink would be an-ot

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Phoenix Kiula
On Mon, Nov 21, 2011 at 10:18 AM, Tomas Vondra wrote: > Dne 20.11.2011 03:33, Amitabh Kant napsal(a): >> On Sun, Nov 20, 2011 at 4:14 AM, Phoenix Kiula >> >> Does the auth file (/var/lib/pgsql/pgbouncer.txt) contain valid login >> credentials to your database? If I remember correctly, it should h

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Phoenix Kiula
On Mon, Nov 21, 2011 at 7:26 AM, Gavin Flower wrote: > How about having 2 indexes: one on each of ip & url_md5? Pg will combine the > indexes as required, or will just use one if that is best. Thanks Gavin. Question: what if I have a joined index? If from a joined index I only use the first co

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Tomas Vondra
Dne 21.11.2011 02:44, Phoenix Kiula napsal(a): > Thanks Tomas and everyone. > > I have the following passwords: > > 1. Pgbouncer.ini file > > [databases] > MYDB = host=127.0.0.1 dbname=MYDB user=MYDB_MYDB client_encoding=utf8 > port=5432 password=='bypass' > > > 2. In the auth_file (with auth

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Ondrej Ivanič
Hi, On 21 November 2011 00:33, Phoenix Kiula wrote: > Hi. > > Want to start another thread, loosely related to the performance > problems thread I have going. > > Need some DB design guidance from the gurus here. > > My big table now has about 70 million rows, with the following columns: You can

Re: [GENERAL] Significant Digits in Floating Point Datatype

2011-11-20 Thread Lee Hachadoorian
On 11/20/2011 02:06 PM, Tom Lane wrote: Lee Hachadoorian writes: And can I reliably retrieve the original integer by casting to int (or bigint) if the number of digits in the original integer is less than 15? On IEEE-floating-point machines, I'd expect float8 to store integers up to 2^52 (or m

Re: [GENERAL] Installed. Now what?

2011-11-20 Thread Phoenix Kiula
On Mon, Nov 21, 2011 at 10:54 AM, Tomas Vondra wrote: > Dne 21.11.2011 02:44, Phoenix Kiula napsal(a): >> Thanks Tomas and everyone. >> >> I have the following passwords: >> >> 1. Pgbouncer.ini file >> >> [databases] >> MYDB  = host=127.0.0.1 dbname=MYDB user=MYDB_MYDB client_encoding=utf8 >> port

Re: [GENERAL] Replacement for tgisconstraint? (Upgrade from 8.4 to 9.0.5)

2011-11-20 Thread Ken Tanzer
Just to follow up on this, I went with istgconstraint which seems to work OK. I didn't see any way to edit the generated restore files and then continue the process. It would be nice if there was option to start (or stop) at the time the files are written. Although it ended up being quite simple

Re: [GENERAL] How to install pgfincore with PG 9.1

2011-11-20 Thread Raghavendra
On Mon, Nov 21, 2011 at 1:06 AM, Cédric Villemain < cedric.villemain.deb...@gmail.com> wrote: > 2011/11/20 Raghavendra : > > Respected, > > I have tried installing pgfincore with PG 9.1(one-click installer). But > > facing below error. > > [root@localhost pgfincore-v1.1]# export > PATH=/opt/Postgr

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread David Johnston
On Nov 20, 2011, at 20:50, Phoenix Kiula wrote: > On Mon, Nov 21, 2011 at 7:26 AM, Gavin Flower > wrote: > >> How about having 2 indexes: one on each of ip & url_md5? Pg will combine the >> indexes as required, or will just use one if that is best. > > > > Thanks Gavin. Question: what if I h

Re: [GENERAL] 9.1.1 build failure : postgres link fails

2011-11-20 Thread Rob Sargentg
On 11/20/2011 11:05 AM, Tom Lane wrote: Rob Sargent writes: On 11/20/2011 09:24 AM, Tom Lane wrote: It appears that on Ubuntu, libbsd defines those symbols, which confuses configure into supposing that they're provided by libc, and then the link fails because libbsd isn't actually linked into

Re: [GENERAL] Table Design question for gurus (without going to "NoSQL")...

2011-11-20 Thread Gavin Flower
On 21/11/11 14:50, Phoenix Kiula wrote: On Mon, Nov 21, 2011 at 7:26 AM, Gavin Flower wrote: How about having 2 indexes: one on each of ip& url_md5? Pg will combine the indexes as required, or will just use one if that is best. Thanks Gavin. Question: what if I have a joined index? If fro