Re: [GENERAL] opened connection

2012-09-30 Thread Levente Kovacs
On Sun, 30 Sep 2012 20:24:47 -0700 Darren Duncan wrote: > Unless you have very unique needs, keeping an open connection for > days is just wrong anyway; if its for the sake of some user GUI or > shell, there probably should be safeguards there to encourage users > to not keep long-running transa

Re: [GENERAL] opened connection

2012-09-30 Thread Scott Marlowe
On Sun, Sep 30, 2012 at 5:41 PM, Nathan Wagner wrote: > On Sun, Sep 30, 2012 at 06:54:35PM +0200, Levente Kovacs wrote: >> I've been using PostgreSQL for quite while, but I'd need some direction on >> how to handle an opened socket to the database in longer periods. >> >> I open the connection to

Re: [GENERAL] enforcing transaction mode for read-write queries.

2012-09-30 Thread Rajesh Kumar Mallah
A gem it was i just needed that . Thanks! I tested and it serves my purpose. On Mon, Oct 1, 2012 at 8:54 AM, David Johnston wrote: > On Sep 30, 2012, at 22:22, Rajesh Kumar Mallah > wrote: > > > Hi , > > > > We are a PerlDBI shop and and are doing a code migration from > > implicit transactio

Re: [GENERAL] transitive pruning optimization on the right side of a join for partition tables

2012-09-30 Thread Waldo, Ethan
Thank you very much for confirming my query results and taking the time to iterate out a test environment and document in such detail. It would be really awesome if the Postgres query plans could infer check constraints from the where clause's foreign key usage in addition to the native key usa

Re: [GENERAL] opened connection

2012-09-30 Thread Darren Duncan
I think a general best practice is to keep a database connection open for as short a time as possible, where that doesn't adversely impact your performance; so, for example, close it if you don't expect to be using it for the next few minutes, and then reopen it. Open connections tie up resourc

Re: [GENERAL] enforcing transaction mode for read-write queries.

2012-09-30 Thread David Johnston
On Sep 30, 2012, at 22:22, Rajesh Kumar Mallah wrote: > Hi , > > We are a PerlDBI shop and and are doing a code migration from > implicit transaction mode (ie, AutoCommit=>0) to an explicit mode (ie, > AutoCommit=>1) . > > While the code migration is ongoing (or even permanently) We wish

Re: [GENERAL] opened connection

2012-09-30 Thread Nathan Wagner
On Sun, Sep 30, 2012 at 06:54:35PM +0200, Levente Kovacs wrote: > I've been using PostgreSQL for quite while, but I'd need some direction on > how to handle an opened socket to the database in longer periods. > > I open the connection to my database with PQconnectdb(). > > I access the database,

[GENERAL] enforcing transaction mode for read-write queries.

2012-09-30 Thread Rajesh Kumar Mallah
Hi , We are a PerlDBI shop and and are doing a code migration from implicit transaction mode (ie, AutoCommit=>0) to an explicit mode (ie, AutoCommit=>1) . While the code migration is ongoing (or even permanently) We wish that postgresql reject any UPDATE , DELETE , INSERT , nextval , setval

Re: [GENERAL] transitive pruning optimization on the right side of a join for partition tables

2012-09-30 Thread Ondrej Ivanič
Hi, On 1 October 2012 01:14, Tom Lane wrote: > "Waldo, Ethan" writes: >> This query does a sequence scan and append across all the partition tables: >> select "dates"."date_description" FROM "myfact" as "myfact", "dates" as >> "dates" where "myfact"."recorded_on_id" = "dates"."recorded_on_id" a

Re: [GENERAL] Would my postgresql 8.4.12 profit from doubling RAM?

2012-09-30 Thread Jeff Janes
On Sat, Sep 29, 2012 at 1:21 PM, Alexander Farber wrote: > > About not giving enough information - > how much information do you want? > If I list all my databases + source code > of the scripts, I doubt anyone will read my mail. Probably not if you just copied and pasted into the body of the ema

[GENERAL] opened connection

2012-09-30 Thread Levente Kovacs
Dear List, I've been using PostgreSQL for quite while, but I'd need some direction on how to handle an opened socket to the database in longer periods. I open the connection to my database with PQconnectdb(). I access the database, everything is fine. However, if I don't access the database for

Re: [GENERAL] transitive pruning optimization on the right side of a join for partition tables

2012-09-30 Thread Tom Lane
"Waldo, Ethan" writes: > This query does a sequence scan and append across all the partition tables: > select "dates"."date_description" FROM "myfact" as "myfact", "dates" as > "dates" where "myfact"."recorded_on_id" = "dates"."recorded_on_id" and > "dates"."recorded_on_id" IN ('4617', '4618', '

Re: [GENERAL] strange permission error

2012-09-30 Thread Tom Lane
Mr Dash Four writes: > In my database I have restricted access to a particular user > (non-superuser), which is used when a cron job passes a series of sql > script files for execution via psql. During one such statement (below) I > get the following set of error: > ERROR: permission denied f

[GENERAL] strange permission error

2012-09-30 Thread Mr Dash Four
In my database I have restricted access to a particular user (non-superuser), which is used when a cron job passes a series of sql script files for execution via psql. During one such statement (below) I get the following set of error: ERROR: permission denied for schema pg_catalog CONTEXT:

Re: [GENERAL] transitive pruning optimization on the right side of a join for partition tables

2012-09-30 Thread Ondrej Ivanič
Hi, On 30 September 2012 21:00, Waldo, Ethan wrote: > Yeah, I actually saw that paper but couldn't find a date on it. Currently > their techniques are well outside > of the scope of my current problem particularly in consideration that I could > switch to MySQL which does support > the right s

Re: [GENERAL] transitive pruning optimization on the right side of a join for partition tables

2012-09-30 Thread Waldo, Ethan
Yeah, I actually saw that paper but couldn't find a date on it. Currently their techniques are well outside of the scope of my current problem particularly in consideration that I could switch to MySQL which does support the right side join pruning. I figured if MySQL can do it, there might be

Re: [GENERAL] transitive pruning optimization on the right side of a join for partition tables

2012-09-30 Thread Ondrej Ivanič
Hi, On 30 September 2012 16:36, Waldo, Ethan wrote: > My question is, does > postgresql support transitive pruning optimization on the right side of a > join for partition tables? If so, how do I get that to work? If not, are > there plans for this and when should a release with this feature be

Re: [GENERAL] transitive pruning optimization on the right side of a join for partition tables

2012-09-30 Thread Ondrej Ivanič
Hi, On 30 September 2012 16:36, Waldo, Ethan wrote: > Once again I reiterate that I don't have control over the query construction > and I am currently running postgresql 9.1.5. My question is, does > postgresql support transitive pruning optimization on the right side of a > join for partition

Re: [GENERAL] transitive pruning optimization on the right side of a join for partition tables

2012-09-30 Thread Waldo, Ethan
I don't need help troubleshooting the problem. I know exactly what the problem is. Either you know if postgresql supports transitive pruning optimization on the right side of a join via a check constraint defined on a table partition or you don't. If you do know, I'd appreciate knowledgeable

Re: [GENERAL] transitive pruning optimization on the right side of a join for partition tables

2012-09-30 Thread Alban Hertroys
On 30 Sep 2012, at 8:36, Waldo, Ethan wrote: > I have a situation where I cannot explicitly control the queries generated > from our BI and I would like to use table partitioning. Unfortunately the > queries don't appear to be taking advantage of the table partitions because > the key used to

Re: [GENERAL] Installing uuid-ossp on 9.2

2012-09-30 Thread Alban Hertroys
On 30 Sep 2012, at 2:24, Mike Christensen wrote: > I built 1.6 directly from the source and ran a make install. I'm > pretty sure this library is installed: > > root@Database:~# locate libuuid.so > /lib/x86_64-linux-gnu/libuuid.so.1 > /lib/x86_64-linux-gnu/libuuid.so.1.3.0 > /usr/lib/x86_64-linu

Re: [GENERAL] Would my postgresql 8.4.12 profit from doubling RAM?

2012-09-30 Thread Alexander Farber
On Sun, Sep 30, 2012 at 2:36 AM, Scott Marlowe wrote: >> Whoa aren't you running pg bouncer? If so then leave pg alone, adjust >> pg bouncer. Revert that db side change, examine pgbouncer config etc. > > > apache/php -> (500 persistent conns, cheap) -> pgbouncer -> (20 > persistent pgsql conns,