Re: R: Re: R: Re: [GENERAL] Weird EXECUTE ... USING behaviour

2010-01-15 Thread Pavel Stehule
> > 3. Then I need to add the TABLE-level CHECK condition in order to > exploit the "constraint_exclusion = on": >            execute $l2$ >              alter table $l2$||ct||$l2$ >                add check(  $l0$||co||$l0$ ) >            $l2$ using $l0$||va||$l0$; > I am sorry, I am out. Your co

Re: R: Re: R: Re: [GENERAL] Weird EXECUTE ... USING behaviour

2010-01-15 Thread Vincenzo Romano
2010/1/15 Pavel Stehule : >> >> 3. Then I need to add the TABLE-level CHECK condition in order to >> exploit the "constraint_exclusion = on": >>            execute $l2$ >>              alter table $l2$||ct||$l2$ >>                add check(  $l0$||co||$l0$ ) >>            $l2$ using $l0$||va||$l0$;

Re: R: Re: R: Re: [GENERAL] Weird EXECUTE ... USING behaviour

2010-01-15 Thread Vincenzo Romano
2010/1/15 Pavel Stehule : > look on this page - maybe it could be useful for you > http://wiki.postgresql.org/wiki/Sprintf This one could save my day! Thanks Pavel. -- Vincenzo Romano NotOrAnd Information Technologies NON QVIETIS MARIBVS NAVTA PERITVS -- Sent via pgsql-general mailing list (pg

Re: R: Re: R: Re: [GENERAL] Weird EXECUTE ... USING behaviour

2010-01-15 Thread Pavel Stehule
2010/1/15 Vincenzo Romano : > 2010/1/15 Pavel Stehule : >>> >>> 3. Then I need to add the TABLE-level CHECK condition in order to >>> exploit the "constraint_exclusion = on": >>>            execute $l2$ >>>              alter table $l2$||ct||$l2$ >>>                add check(  $l0$||co||$l0$ ) >>>

Re: R: Re: R: Re: [GENERAL] Weird EXECUTE ... USING behaviour

2010-01-15 Thread Pavel Stehule
2010/1/15 Pavel Stehule : > 2010/1/15 Vincenzo Romano : >> 2010/1/15 Pavel Stehule : 3. Then I need to add the TABLE-level CHECK condition in order to exploit the "constraint_exclusion = on":            execute $l2$              alter table $l2$||ct||$l2$              

Re: [GENERAL] Rows missing from table despite FK constraint

2010-01-15 Thread Konrad Garus
Guys, just following up on the issue... For no apparent reason the row became visible in seq scans. After another REINDEX everything appears to be correct. I don't know what the issue was and I'm rather uncomfortable about how it appeared and went away, but anyway it seems to have been resolved.

Re: R: Re: R: Re: [GENERAL] Weird EXECUTE ... USING behaviour

2010-01-15 Thread Vincenzo Romano
2010/1/15 Vincenzo Romano : > 2010/1/15 Pavel Stehule : >> look on this page - maybe it could be useful for you >> http://wiki.postgresql.org/wiki/Sprintf > > This one could save my day! > Thanks Pavel. EXECUTE PRINTF( ); It's great. It's working. It's a must-have-as-builtin! -- Vincenzo

Re: [GENERAL] vacuum issues under load?

2010-01-15 Thread Tom Lane
Ben Chobot writes: > We have recently discovered a problem with our slony-1 cluster of 8.1.19 > installs. Specifically, we are unable to vacuum a table on the master > node; vacuum always hangs on the same index of the same table. If we do a > slony switchover and make the other node the master

Re: [GENERAL] vacuum issues under load?

2010-01-15 Thread Ben Chobot
On Fri, 15 Jan 2010, Tom Lane wrote: Ben Chobot writes: We have recently discovered a problem with our slony-1 cluster of 8.1.19 installs. Specifically, we are unable to vacuum a table on the master node; vacuum always hangs on the same index of the same table. If we do a slony switchover and

[GENERAL] Table name from directory

2010-01-15 Thread Jason Armstrong
How do I get the name of a database from a directory on disk (eg $datadir/base/16494)? -- Jason Armstrong -- 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] vacuum issues under load?

2010-01-15 Thread Tom Lane
Ben Chobot writes: > On Fri, 15 Jan 2010, Tom Lane wrote: >> Try attaching to the process with gdb and getting a stack trace. > #0 0x7f59a5d78ca7 in semop () from /lib/libc.so.6 > #1 0x00546656 in PGSemaphoreLock () > #2 0x005618ee in LockBufferForCleanup () > #3 0x000

Re: [GENERAL] Table name from directory

2010-01-15 Thread Tom Lane
Jason Armstrong writes: > How do I get the name of a database from a directory on disk (eg > $datadir/base/16494)? That number should match the pg_database.oid column. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make change

Re: [GENERAL] vacuum issues under load?

2010-01-15 Thread Ben Chobot
On Fri, 15 Jan 2010, Tom Lane wrote: #0 0x7f59a5d78ca7 in semop () from /lib/libc.so.6 #1 0x00546656 in PGSemaphoreLock () #2 0x005618ee in LockBufferForCleanup () #3 0x0045c8e2 in btbulkdelete () OK, so it's trying to get an exclusive page-level lock on some pa

Re: [GENERAL] vacuum issues under load?

2010-01-15 Thread Tom Lane
Ben Chobot writes: > On Fri, 15 Jan 2010, Tom Lane wrote: >> OK, so it's trying to get an exclusive page-level lock on some page of >> the index. The only thing that could block that for any long period is >> if some other process is sitting with an open indexscan. Look around >> for processes t

[GENERAL] Creation of tablespaces

2010-01-15 Thread DURAND Benoît
Hello, I work with Ubuntu 9.10 (upgraded from 8.04 LTS yesterday) and PostgreSQL 8.3. I can't create tablespaces. Pgsql seems to try changing access rights of the directory and fails to do it (permission denied), despite the directory is owned by the postgres user Under the Ubuntu 8.04 LTS distri

Re: [GENERAL] vacuum issues under load?

2010-01-15 Thread Scott Marlowe
On Fri, Jan 15, 2010 at 7:45 AM, Tom Lane wrote: > Ben Chobot writes: >> We have recently discovered a problem with our slony-1 cluster of 8.1.19 >> installs. Specifically, we are unable to vacuum a table on the master >> node; vacuum always hangs on the same index of the same table. If we do a >

Re: [GENERAL] Table name from directory

2010-01-15 Thread Scott Marlowe
On Fri, Jan 15, 2010 at 7:59 AM, Jason Armstrong wrote: > How do I get the name of a database from a directory on disk (eg > $datadir/base/16494)? There's a handy little utility called oid2name you can use to do it from the command line. -- Sent via pgsql-general mailing list (pgsql-general@pos

Re: [GENERAL] Creation of tablespaces

2010-01-15 Thread Tom Lane
=?iso-8859-1?Q?DURAND_Beno=EEt?= writes: > I work with Ubuntu 9.10 (upgraded from 8.04 LTS yesterday) and PostgreSQL 8.3. > I can't create tablespaces. Pgsql seems to try changing access rights of the > directory and fails to do it (permission denied), despite the directory is > owned by the pos

[GENERAL] Tablespace creation

2010-01-15 Thread DURAND Benoît
Hello, I work with Ubuntu 9.10 (upgraded from 8.04 LTS yesterday) and PostgreSQL 8.3. I can't create tablespaces. Pgsql seems to try changing access rights of the directory and fails to do it (permission denied), despite the directory is owned by the postgres user Under the Ubuntu 8.04 LTS distri

[GENERAL] identify Tables without primary keys - postgres

2010-01-15 Thread akp geek
Dear all - I have the following query to find the tables with primary keys. can you please help me finding the tables without primary key. select distinct x.table_name, from information_schema.constraint_column_usage x, pg_constraint b where b.contype='p' and x.cons

Re: [GENERAL] identify Tables without primary keys - postgres

2010-01-15 Thread Rodrigo Gonzalez
Check http://petereisentraut.blogspot.com/2009/07/how-to-find-all-tables-without-primary.html On Fri, 2010-01-15 at 11:39 -0500, akp geek wrote: > Dear all - > > I have the following query to find the tables with > primary keys. can you please help me finding the tables without > pr

RE : [GENERAL] Creation of tablespaces

2010-01-15 Thread DURAND Benoît
The directory is on another (external) disk, mounted under /media. Postgres has not r+x rights on that directory (or on /) which belong to root. regards, Benoit Durand De : Tom Lane [...@sss.pgh.pa.us] Date d'envoi : vendredi 15 janvier 2010 16:51 À : DURAN

Re: RE : [GENERAL] Creation of tablespaces

2010-01-15 Thread Tom Lane
=?iso-8859-1?Q?DURAND_Beno=EEt?= writes: > The directory is on another (external) disk, mounted under /media. Postgres > has not r+x rights on that directory (or on /) which belong to root. That would be your problem then ... (It might not actually need r, but it definitely must have x, in orde

[GENERAL] OT: Db2 connection pooling?

2010-01-15 Thread Alan McKay
Hey folks, Sorry for the OT - we are most of the way through a Db2 --> PG migration that is some 18 months in the making so far.We've got maybe another 3 to 6 months to go before we are complete, and in the meantime have identified the need for connection pooling in Db2, a-la the excellent pgb

Re: [GENERAL] OT: Db2 connection pooling?

2010-01-15 Thread Joshua D. Drake
On Fri, 2010-01-15 at 12:16 -0500, Alan McKay wrote: > Hey folks, > > Sorry for the OT - we are most of the way through a Db2 --> PG > migration that is some 18 months in the making so far.We've got > maybe another 3 to 6 months to go before we are complete, and in the > meantime have identifi

Re: [GENERAL] Calling a plpgsql function with composite type as parameter?

2010-01-15 Thread Scott Bailey
Jamie Begin wrote: I'm working on an e-commerce site that calls various plpgsql functions from a Python app. One of the things I need to do is create a shopping cart and add several items to it. I'd like for both of these steps to be contained within the same transaction so if an error occurs a

Re: [GENERAL] Creation of tablespaces

2010-01-15 Thread Aaron
Ubuntu never shipped with selinux, it is available by installing the "selinux" meta-package. Ubuntu does ship with AppArmor and loaded by default in Hardy 8.04 and beyond but I don't believe there are any PotgreSQL profiles. Aaron Thul http://www.chasingnuts.com On Fri, Jan 15, 2010 at 10:51

[GENERAL] Incorrect FTS query results with GIN index

2010-01-15 Thread Vyacheslav Kalinin
Hello, Basically, I started testing prefix matching in FTS and got into troubles. Self-contained example follows: postgres=# select version(); version ---

Re: [GENERAL] Calling a plpgsql function with composite type as parameter?

2010-01-15 Thread Merlin Moncure
On Thu, Jan 14, 2010 at 8:50 PM, Jamie Begin wrote: > I'm working on an e-commerce site that calls various plpgsql functions > from a Python app.  One of the things I need to do is create a > shopping cart and add several items to it.  I'd like for both of these > steps to be contained within the

Re: [GENERAL] Incorrect FTS query results with GIN index

2010-01-15 Thread Teodor Sigaev
Thank you for the report, will see on this weekend Vyacheslav Kalinin wrote: Hello, Basically, I started testing prefix matching in FTS and got into troubles. Self-contained example follows: -- Teodor Sigaev E-mail: teo...@sigaev.ru

Re: [GENERAL] OT: Db2 connection pooling?

2010-01-15 Thread Alan McKay
> http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/conn/c0006170.htm Yeah, that is Db2 Enterprise, and we have Workgroup Server version. And the cost of upgrading to that was part of why we decided to move to PG. So I should have been more specific - a FREE

Re: [GENERAL] OT: Db2 connection pooling?

2010-01-15 Thread Scott Marlowe
On Fri, Jan 15, 2010 at 2:40 PM, Alan McKay wrote: >> http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/conn/c0006170.htm > > Yeah, that is Db2 Enterprise, and we have Workgroup Server version. > And the cost of upgrading to that was part of why we decided to

Re: [GENERAL] OT: Db2 connection pooling?

2010-01-15 Thread Alan McKay
On Fri, Jan 15, 2010 at 4:45 PM, Scott Marlowe wrote: > What language are you running this in again?  There might be other > options that are more language oriented (java for instance) than db > oriented.  Or maybe some intermediate layer for pooling that's db > agnostic. Oh, should have mentione

Re: [GENERAL] OT: Db2 connection pooling?

2010-01-15 Thread Joshua D. Drake
On Fri, 2010-01-15 at 17:35 -0500, Alan McKay wrote: > On Fri, Jan 15, 2010 at 4:45 PM, Scott Marlowe > wrote: > > What language are you running this in again? There might be other > > options that are more language oriented (java for instance) than db > > oriented. Or maybe some intermediate l

Re: [GENERAL] OT: Db2 connection pooling?

2010-01-15 Thread Alan McKay
On Fri, Jan 15, 2010 at 5:36 PM, Joshua D. Drake wrote: > Mod_perl? That on our front-end servers, as well as just regular perl on the back end. -- “Don't eat anything you've ever seen advertised on TV” - Michael Pollan, author of "In Defense of Food" -- Sent via pgsql-general mail