[GENERAL] Full Text Partial Match at begining

2010-11-30 Thread AI Rumman
Is it possible to match %text' in Postgresql 9 Full Text. select to_tsvector('english','this is advantage') @@ to_tsquery('tage'); f I need to get result true for this type of matching. Any idea please.

Re: [GENERAL] PostgreSQL hanging on new connections?

2010-11-30 Thread Craig Ringer
On 11/30/2010 03:28 PM, Dusan Misic wrote: We're having similar issues on 8.4.[245]... occasionally psql takes anywhere from a few to several dozen seconds to connect. I've been unsuccessfully trying to blame spikes in the OS run queue (we desperately need some connection

[GENERAL] select max()

2010-11-30 Thread Alexander Farber
Hello, I have this table where I store player results for each week: # select * from pref_money limit 5; id | money | yw +---+- OK32378280203 | -27 | 2010-44 OK274037315447 | -56 | 2010-44 OK19644992852 | 8 | 2010-44 OK21807961329 | 114

Re: [GENERAL] PostgreSQL hanging on new connections?

2010-11-30 Thread Dusan Misic
On Tue, Nov 30, 2010 at 10:20 AM, Craig Ringer cr...@postnewspapers.com.auwrote: On 11/30/2010 03:28 PM, Dusan Misic wrote: We're having similar issues on 8.4.[245]... occasionally psql takes anywhere from a few to several dozen seconds to connect. I've been unsuccessfully trying to

Re: [GENERAL] PostgreSQL hanging on new connections?

2010-11-30 Thread Florian Weimer
* hubert depesz lubaczewski: Now, the question is: why did it hang? Is there anything we can do to make it *not* hang? It might be some general system overload issue. Try running echo w /proc/sysrq-trigger as root the next time it happens. This will dump kernel backtraces to dmesg, which

Re: [GENERAL] alter table add column - specify where the column will go?

2010-11-30 Thread Jasen Betts
On 2010-11-24, Daniel Verite dan...@manitou-mail.org wrote: Fredric Fredricson wrote: But if you change the column names in the second SELECT in the UNION this is ignored: # SELECT c1,c2 FROM (SELECT 1 AS c1, 2 AS c2 UNION SELECT 2 AS c3, 1 AS c4) AS x; c1 | c2 + 1 | 2

[GENERAL] advise on performance issues please

2010-11-30 Thread Gregory Machin
Hi this is the first time I'm working with Posgresql other than a defualt install. I have a CentOS 5.5 virtual machine with - 4 virtual cpus , 8 Gig RAM , resource pool set to High (8000) running on a vmware ESXi 4.1 host - 4 x 2.4 GHz cpus AMD 6 cores each, 96 Gig ram, storage is provided by HP

[GENERAL] how to increase upsize speed

2010-11-30 Thread Andrus
I installed PostgreSql 9 in Win server 2008 R2 x64 dedicated server and used stack builder to optimize postgresql.conf file as dedicated server. Upsize program runs in same server. Upsize starts transaction. Then it creates new table, sends insert statements to server through ODBC driver for

Re: [GENERAL] select max()

2010-11-30 Thread Alexander Farber
Ok, it is # select id from pref_money where money in (select max(money) from pref_money group by yw); id DE8048 VK91770810 DE7115 OK252342810632 OK22853997 (5 rows) And to see how many times a player has won is: # select count(id) from pref_money where

Re: [GENERAL] PostgreSQL hanging on new connections?

2010-11-30 Thread hubert depesz lubaczewski
On Mon, Nov 29, 2010 at 03:57:29PM -0500, Vick Khera wrote: On Mon, Nov 29, 2010 at 1:23 PM, Tom Lane t...@sss.pgh.pa.us wrote: hubert depesz lubaczewski dep...@depesz.com writes: straced postmaster when the problem was happening, and I was opening new connections. strace looks like this:

Re: [GENERAL] PostgreSQL hanging on new connections?

2010-11-30 Thread hubert depesz lubaczewski
On Tue, Nov 30, 2010 at 10:12:47AM +, Florian Weimer wrote: * hubert depesz lubaczewski: Now, the question is: why did it hang? Is there anything we can do to make it *not* hang? It might be some general system overload issue. Try running echo w /proc/sysrq-trigger as root the

Re: [GENERAL] advise on performance issues please

2010-11-30 Thread Mark Felder
On Tue, 30 Nov 2010 04:34:32 -0600, Gregory Machin g...@linuxpro.co.za wrote: running on a vmware ESXi 4.1 host - 4 x 2.4 GHz cpus AMD 6 cores each, 96 Gig ram, storage is provided by HP Left hand SAN iSCSI. Does the VM do iSCSI itself to get access to the filesystem on the SAN, or is

[GENERAL] techniques for bulk load of spatial data

2010-11-30 Thread Mario Corchero
Hi, I'm a student of Computer Science, I know diffrents techniques of bulk load, but I need to know how specifically postgreSQL make a bulk load of spatial data, could anyone help me please? Thank you. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] techniques for bulk load of spatial data

2010-11-30 Thread Andy Colson
On 11/30/2010 7:29 AM, Mario Corchero wrote: Hi, I'm a student of Computer Science, I know diffrents techniques of bulk load, but I need to know how specifically postgreSQL make a bulk load of spatial data, could anyone help me please? Thank you. That is a pretty generic question. Have you

Re: [GENERAL] advise on performance issues please

2010-11-30 Thread Andy Colson
On 11/30/2010 4:34 AM, Gregory Machin wrote: Hi this is the first time I'm working with Posgresql other than a defualt install. I have a CentOS 5.5 virtual machine with - 4 virtual cpus , 8 Gig RAM , resource pool set to High (8000) running on a vmware ESXi 4.1 host - 4 x 2.4 GHz cpus AMD 6

[GENERAL] how can i bugfix idle in transaction lockups ?

2010-11-30 Thread Jonathan Vanasco
on a project, i find myself continually finding the database locked up with idle in transaction connections are there any commands that will allow me to check exactly what was going on in that transaction ? i couldn't find anything in the docs, and the project has decent traffic, so its going

Re: [GENERAL] how can i bugfix idle in transaction lockups ?

2010-11-30 Thread Ben Chobot
On Nov 30, 2010, at 7:21 AM, Jonathan Vanasco wrote: on a project, i find myself continually finding the database locked up with idle in transaction connections are there any commands that will allow me to check exactly what was going on in that transaction ? i couldn't find anything

[GENERAL] How to indicate failure of a shell script to pgagent

2010-11-30 Thread Wappler, Robert
Hi, I'm using postgresql 8.4.5 and pgagent 1.8.4 on debian lenny. I set up a pgagent job, which executes every 15 minutes. In one step, there is a shell script executed. For testing purposes, the script is simply a one-liner containing exit 1. Nevertheless, pgAdmin tells me, the job executed

[GENERAL] Extension for file management under postgres

2010-11-30 Thread A J
Does anyone know of a module for postgres that can do metadata management in postgres but actual storage of binary objects in filesystem ? Not really using Postgres large object but want to just do the metadata management with postgres. Example, need to store file

[GENERAL] How to find correct locale name for CREATE DATABASE

2010-11-30 Thread Andrus
I tried in Debian (PostgreSQL 9.0.1 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 64-bit) : 1. CREATE DATABASE mydb WITH TEMPLATE=template0 LC_COLLATE='Estonian_Estonia.1257' LC_CTYPE='Estonian_Estonia.1257' OWNER=mydb_owner ENCODING='UNICODE' 2. CREATE DATABASE

Re: [GENERAL] How to find correct locale name for CREATE DATABASE

2010-11-30 Thread Thom Brown
2010/11/30 Andrus kobrule...@hot.ee: I tried in  Debian (PostgreSQL 9.0.1 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 64-bit) : 1. CREATE DATABASE mydb WITH TEMPLATE=template0 LC_COLLATE='Estonian_Estonia.1257' LC_CTYPE='Estonian_Estonia.1257'

Re: [GENERAL] Comparing first 3 numbers of a IPv4 address?

2010-11-30 Thread Jasen Betts
On 2010-11-20, Alexander Farber alexander.far...@gmail.com wrote: 1) if I'd like to compare just the first 3 numbers of the IP address instead of the 4, how can I do it? (yes, I know about the A,B,C type of IPv4 networks...) have you heard of CIDR (what about IPV6, which I'm going to

Re: [GENERAL] finding rows with invalid characters

2010-11-30 Thread Jasen Betts
On 2010-11-21, Sim Zacks s...@compulab.co.il wrote: I am using PG 8.2.17 with UTF8 encoding. PostgreSQL 8.2.17 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.1 (Gentoo 4.1.1) One of my tables somehow has invalid characters in it: ERROR: invalid byte sequence for encoding UTF8: 0xa9

Re: [GENERAL] how can i bugfix idle in transaction lockups ?

2010-11-30 Thread Merlin Moncure
On Tue, Nov 30, 2010 at 10:21 AM, Jonathan Vanasco postg...@2xlp.com wrote: on a project, i find myself continually finding the database locked up with idle in transaction connections are there any commands that will allow me to check exactly what was going on in that transaction ? i

Re: [GENERAL] lock file permisson

2010-11-30 Thread Peter Eisentraut
On mån, 2010-11-29 at 21:57 +0530, Mohammed Rashad wrote: when i start postgresql using /etc/init.d/postgresql-8.4 start I am getting this error IST FATAL: could not create lock file /var/run/postgresql/.s.PGSQL.5432.lock: Permission denied You probably need to run this command as root.

[GENERAL] Pg_upgrade question

2010-11-30 Thread DM
We are planning to upgrade to 9.01 from 8.4/8.3 version. On my production Server, there isn't much space left to do a pg_upgrade (Copy), Can I execute pg_upgrade from new box by pointing to the data directory and binaries on old box. Thanks Deepak

Re: [GENERAL] Pg_upgrade question

2010-11-30 Thread Devrim GÜNDÜZ
On Tue, 2010-11-30 at 14:00 -0800, DM wrote: We are planning to upgrade to 9.01 from 8.4/8.3 version. On my production Server, there isn't much space left to do a pg_upgrade (Copy), You can use pg_upgrade in link mode -- and AFAIK it uses less extra space as compared to copy mode:

Re: [GENERAL] Pg_upgrade question

2010-11-30 Thread Vick Khera
On Tue, Nov 30, 2010 at 5:00 PM, DM dm.a...@gmail.com wrote: Can I execute pg_upgrade from new box by pointing to the data directory and binaries on old box. If you're moving to a new box anyway, you might as well just do the traditional pg_dump and restore. -- Sent via pgsql-general mailing

[GENERAL] Warm Standby log filling up with FATAL: the database system is starting up entries

2010-11-30 Thread Greg Swisher
Hi Everybody, I am not a linux expert, but am able to follow well enough documentation and such that I have been able to get postgresql 9.0.1 up and running on Debian Lenny in a primary + warm standby configuration, for the most part. I am successfully sending WAL files to a standby server temp

[GENERAL] Does Postgres support bookmarks (tuples ids)?

2010-11-30 Thread Konstantin Izmailov
Dear experts, I've noticed that commercial databases (e.g. SQLServer) and some open source databases (e.g. Cubrid) support so called bookmarks. As far as I understood, a bookmark allows quickly jump to a row for retrieval or modification. Here is scenario that I'm trying to deal with: A BI/ETL

Re: [GENERAL] Does Postgres support bookmarks (tuples ids)?

2010-11-30 Thread Dann Corbit
Perhaps you want to use the ctid. You can query it like any other column: http://www.postgresql.org/docs/9.0/static/ddl-system-columns.html The ctid is not permanent. An alternative is to create tables with OID values. From: pgsql-general-ow...@postgresql.org

Re: [GENERAL] Does Postgres support bookmarks (tuples ids)?

2010-11-30 Thread Dann Corbit
Is your application by chance using OLEDB? If that is the case, then just get a PostgreSQL OLEDB provider that supports bookmarks. From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Konstantin Izmailov Sent: Tuesday, November 30, 2010 9:50 PM To: