Re: [GENERAL] Lock table, best option?

2010-04-26 Thread Scott Marlowe
On Sat, Apr 24, 2010 at 2:46 PM, Andre Lopes wrote: > Hi, > > I need to do a SELECT and an UPDATE, but I will have concurrent processes > doing the same task. If you're selecting and updating the same rows, then select ... for update is preferred and adequate. If you're selecting one set of rows

Re: [GENERAL] Deadlock occur while creating new table to be used in partition.

2010-04-26 Thread Yan Cheng CHEOK
By the way, how I can diagnostic, what is 1) relation 46757 2) database 46753 Thanks and Regards Yan Cheng CHEOK --- On Mon, 4/26/10, Tom Lane wrote: > From: Tom Lane > Subject: Re: [GENERAL] Deadlock occur while creating new table to be used in > partition. > To: "Yan Cheng CHEOK" > Cc: p

Re: [GENERAL] Unable to run createlang (or psql for that matter)

2010-04-26 Thread Jorge Arevalo
On Sun, Apr 25, 2010 at 11:08 AM, John Gage wrote: > If I open a bash terminal and type createlang -l, I get: > > JohnGage:~ johngage$ createlang -l > -bash: createlang: command not found > JohnGage:~ johngage$ psql > -bash: psql: command not found > > as one can see, the same thing happens with p

[GENERAL] Inheritance efficiency

2010-04-26 Thread Vincenzo Romano
Hi all. I'm wondering how efficient the inheritance can be. I'm using the constraint exclusion feature and for each child table (maybe but one) I have a proper CHECK constraint. How efficient can the query planner be in choosing the right child tables in the case of, say, thousands of them? Would

Re: [GENERAL] Unable to run createlang (or psql for that matter)

2010-04-26 Thread John Gage
Fascinatingly, to me at least, as follows (I threw in "which bash"): JohnGage:~ johngage$ which createlang JohnGage:~ johngage$ which psql JohnGage:~ johngage$ which bash /bin/bash i.e. zilch Here's what I am able to do: JohnGage:~ johngage$ su postgres Password: su: Sorry JohnGage:~ johngage$

Re: [GENERAL] Problem with pg_prepare

2010-04-26 Thread Kenichiro Tanaka
HI. >"Call to undefined function pg_prepare()". What version is your PostgreSQL(libpq)? And do your error occur on PHP program? pg_prepare() is supported only against PostgreSQL 7.4 or higher connections. http://php.net/manual/en/function.pg-prepare.php Thank you. (2010/04/24 6:57), Giancarlo

Re: [GENERAL] Deadlock occur while creating new table to be used in partition.

2010-04-26 Thread Yan Cheng CHEOK
I wish to have simpler solution too :) The reason I want to use "complicated" table partition way is that : (1) I have a few thousands lot's row (2) Each lot will associate with millions row of unit. (3) If I use a single unit tables, my unit tables will have billions of row :o The design works

Re: [GENERAL] Unable to run createlang (or psql for that matter)

2010-04-26 Thread Dave Page
On Mon, Apr 26, 2010 at 8:55 AM, John Gage wrote: > A very key difficulty is that if I attempt to add postgres as a user to my > system, my system tells me postgres already is a user.  But, unfortunately, > postgres as a user on my system has no password.  His postgresql password > does not work

Re: [GENERAL] Unable to run createlang (or psql for that matter)

2010-04-26 Thread John Gage
Thank you. The reason I wanted to use it interactively is, at base, ignorance. I do not completely remember everything that happened when I installed Postgresql (on Mac OSX). I did it with the Enterprise installer, however, that I do remember. But what I begin to think is that *any* insta

[GENERAL] Convert odb to Postgres

2010-04-26 Thread Luís de Sousa
Hello everyone, I have an OpenOffice dabatase that I'd like to convert to Postgres. More specifically I need to replicate tables, not null constraints, primary keys, foreign keys, autonumbers and data. There's a tool that does this with Microsoft databses: http://wiki.postgresql.org/wiki/Microsof

Re: [GENERAL] Convert odb to Postgres

2010-04-26 Thread Thomas Kellerer
Luís de Sousa, 26.04.2010 12:09: Hello everyone, I have an OpenOffice dabatase that I'd like to convert to Postgres. More specifically I need to replicate tables, not null constraints, primary keys, foreign keys, autonumbers and data. There's a tool that does this with Microsoft databses: http:

Re: [GENERAL] Inheritance efficiency

2010-04-26 Thread Bruce Momjian
Vincenzo Romano wrote: > Hi all. > > I'm wondering how efficient the inheritance can be. > I'm using the constraint exclusion feature and for each child table > (maybe but one) I have a proper CHECK constraint. > How efficient can the query planner be in choosing the right child > tables in the ca

[GENERAL] Table Bloat still there after the Vacuum

2010-04-26 Thread akp geek
Hi All - I have a table bloated with following details rows:29431 pages:516039 shouldbe:534 (966.4X) wasted size:4223016960 (3 GB) * I did a vacuum on the database and also I did vacuumdb full on the table. Still there is no change. Can you please suggest if t

Re: [GENERAL] Table Bloat still there after the Vacuum

2010-04-26 Thread Bill Moran
In response to akp geek : > Hi All - > > I have a table bloated with following details > rows:29431 pages:516039 shouldbe:534 (966.4X) wasted size:4223016960 (3 GB) > * > > I did a vacuum on the database and also I did vacuumdb > full on the table. Still ther

Re: [GENERAL] Table Bloat still there after the Vacuum

2010-04-26 Thread Cédric Villemain
2010/4/26 akp geek : > Hi All - >                   I have a table bloated with following details > rows:29431 pages:516039 shouldbe:534 (966.4X) wasted size:4223016960 (3 GB) > * I think this info come from check_postgres nagios script. As said in the doc, this info is not 100% sure : it depend o

Re: [GENERAL] Table Bloat still there after the Vacuum

2010-04-26 Thread akp geek
*What I did was, I issued the following command * * * *$vacuumdb -d prodDB -t orders -f -z -v * * * * * * "Orders": found 0 removable, 27164544 nonremovable row versions in 518971 pages* *DETAIL: 27126176 dead row versions cannot be removed yet.* *Nonremovable row versions range from 118 to 213

Re: [GENERAL] Table Bloat still there after the Vacuum

2010-04-26 Thread Cédric Villemain
2010/4/26 Cédric Villemain : > 2010/4/26 akp geek : >> Hi All - >>                   I have a table bloated with following details >> rows:29431 pages:516039 shouldbe:534 (966.4X) wasted size:4223016960 (3 GB) >> * > > I think this info come from check_postgres nagios script. > As said in the doc,

Re: [GENERAL] Inheritance efficiency

2010-04-26 Thread Vincenzo Romano
2010/4/26 Bruce Momjian : > Vincenzo Romano wrote: >> Hi all. >> >> I'm wondering how efficient the inheritance can be. >> I'm using the constraint exclusion feature and for each child table >> (maybe but one) I have a proper CHECK constraint. >> How efficient can the query planner be in choosing t

[GENERAL] Start-up script for few clusters: just add water?

2010-04-26 Thread Eustace Scrubb
Hi all, I've installed Postgres with few instances/clusters, however I've got a problem with start-up scripts for all clusters. As far as I know the file postgresql should be modified in the /etc/sysconfig/pgsql directory. The question is as follows: Can I paste few clusters in this file? Current

Re: [GENERAL] Table Bloat still there after the Vacuum

2010-04-26 Thread Tom Lane
akp geek writes: > * "Orders": found 0 removable, 27164544 nonremovable row versions in 518971 > pages* > *DETAIL: 27126176 dead row versions cannot be removed yet.* So there isn't anything vacuum can do right now. You've apparently got an old open transaction, which is blocking vacuum from rem

[GENERAL] Convert odb to Postgres

2010-04-26 Thread Luís de Sousa
Hello everyone, I have an OpenOffice dabatase that I'd like to convert to Postgres. More specifically I need to replicate tables, not null constraints, primary keys, foreign keys, autonumbers and data. There's a tool that does this with Microsoft databses: http://wiki.postgresql.org/wiki/Microsof

Re: [GENERAL] Start-up script for few clusters: just add water?

2010-04-26 Thread Scott Marlowe
On Mon, Apr 26, 2010 at 5:45 AM, Eustace Scrubb wrote: > > Hi all, > > I've installed Postgres with few instances/clusters, however I've got a > problem with start-up scripts for all clusters. As far as I know the file > postgresql should be modified in the /etc/sysconfig/pgsql directory. The > qu

Re: [GENERAL] Table Bloat still there after the Vacuum

2010-04-26 Thread Chris . Ellis
pgsql-general-ow...@postgresql.org wrote on 04/26/2010 03:43:03 PM: > Hi All - > > I have a table bloated with following details > rows:29431 pages:516039 shouldbe:534 (966.4X) wasted size:4223016960(3 GB) * > > I did a vacuum on the database and also I did

Re: [GENERAL] Unable to run createlang (or psql for that matter)

2010-04-26 Thread Giles Lean
Dave Page wrote: > The account doesn't have a password by default as it's a service > account and you shouldn't need to use it interactively. > > If you really want to though, just set a password: > > gator:~ dpage$ sudo passwd postgres > Changing password for postgres. > New password: > Retyp

[GENERAL] gmake check problem

2010-04-26 Thread jkunkel
I built 8.4.3 on Centos 5 with just ./configure and gmakeWhen I run gmake check, the process stops at "test stats    ..."There is no residual postgresql or postmaster running (consuming clock cycles on top).When I break the process, I get the following errors:gmake[2]: *** wait: No chil

Re: [GENERAL] Table Bloat still there after the Vacuum

2010-04-26 Thread akp geek
Thank you all for providing me important details. I will certainly follow them to fix the issue I have Regards On Mon, Apr 26, 2010 at 11:53 AM, wrote: > > > pgsql-general-ow...@postgresql.org wrote on 04/26/2010 03:43:03 PM: > > > Hi All - > > > > I have a table bloated with

Re: [GENERAL] ALTER Bigserial error

2010-04-26 Thread Little, Douglas
Thanks for the response tom, I agree it's more of an missing feature. Regarding the concensus for direction. I'd like to see the product move in the direction of the sql standard. Overloading types with macro's probably wasn't a good idea, since it leads people like me astray. Maybe the doc

[GENERAL] gmake check problem

2010-04-26 Thread jkunkel
I built 8.4.3 on Centos 5 with just ./configure and gmake When I run gmake check, the process stops at "test stats ..." There is no residual postgresql or postmaster running (consuming clock cycles on top). When I break the process, I get the following errors: gmake[2]: *** w

Re: [GENERAL] Start-up script for few clusters: just add water?

2010-04-26 Thread Alvaro Herrera
Eustace Scrubb wrote: > Such script will start only one cluster during server rebooting. Can I just > add more clusters in PGDATA in the file, something like this: > > PGPORT=5566 > PGDATA=/db/first_cluster > PGPORT=5567 > PGDATA=/db/second_cluster > PGPORT=5568 > PGDATA=/db/third_cluster > > Wi

Re: [GENERAL] gmake check problem

2010-04-26 Thread Tom Lane
jkun...@laurcat.com writes: > I built 8.4.3 on Centos 5 with just ./configure and gmake > When I run gmake check, the process stops at "test stats > ..." Is it really hung, or just taking a long time? Is there anything at the top of the postmaster log file suggesting trouble in sta

Re: [GENERAL] Upgrading 8.2.4 to 8.3 With TSearch2

2010-04-26 Thread Howard Cole
Tom Lane wrote: There's some suggestions in the fine manual ... http://www.postgresql.org/docs/8.4/static/textsearch-migration.html regards, tom lane Thats the most polite RTFM response I have ever seen! I read the suggested part of the manual and the update was seaml

Re: [GENERAL] ALTER Bigserial error

2010-04-26 Thread Scott Marlowe
On Mon, Apr 26, 2010 at 12:59 PM, Little, Douglas wrote: > Thanks for the response tom, > I agree it's more of an missing feature. > Regarding the concensus for direction.  I'd like to see the product move in > the direction of the sql standard. Curiously, what does the SQL spec have to say abou

Re: [GENERAL] Start-up script for few clusters: just add water?

2010-04-26 Thread Guillaume Lelarge
Le 26/04/2010 13:45, Eustace Scrubb a écrit : > [...] > I've installed Postgres with few instances/clusters, however I've got a > problem with start-up scripts for all clusters. As far as I know the file > postgresql should be modified in the /etc/sysconfig/pgsql directory. The > question is as fol

Re: [GENERAL] Unable to run createlang (or psql for that matter)

2010-04-26 Thread Scott Mead
On Mon, Apr 26, 2010 at 3:36 AM, Jorge Arevalo wrote: > On Sun, Apr 25, 2010 at 11:08 AM, John Gage > wrote: > > If I open a bash terminal and type createlang -l, I get: > > > > JohnGage:~ johngage$ createlang -l > > -bash: createlang: command not found > > JohnGage:~ johngage$ psql > > -bash: ps

Re: [GENERAL] Unable to run createlang (or psql for that matter)

2010-04-26 Thread John Gage
To be perfectly honest, I don't believe it either, but here it is: JohnGage:~ johngage$ echo $PATH /opt/subversion/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/ Library/PostgresPlus/8.4/bin:/usr/local/bin:~/Desktop/WritingTools/ EfficientAWK JohnGage:~ johngage$ createlang -l -bash: createl

Re: [GENERAL] Unable to run createlang (or psql for that matter)

2010-04-26 Thread Scott Mead
On Mon, Apr 26, 2010 at 8:35 PM, John Gage wrote: > To be perfectly honest, I don't believe it either, but here it is: > > JohnGage:~ johngage$ echo $PATH > > /opt/subversion/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/Library/PostgresPlus/8.4/bin:/usr/local/bin:~/Desktop/WritingTools/Efficie