[GENERAL] passing text value with single quote to stored procedure

2013-07-12 Thread Prabhjot Sheena
Hi all I am currently having an issue with passing a value with a single quote in it to stored procedure i am trying to pass this text value QA_SUMMER ' 2013_(EU/US) to stored procedure text variable. it gives me error. Here is more detail on this My stored procedure is something

[GENERAL] system catalog to check if auto vacuum is disabled for a particular table

2013-08-08 Thread Prabhjot Sheena
Guys i am using postgresql 9.2. How can i check if a particular table has auto vacuum disabled manually or not. Which system catalog can get me this information? Thanks

[GENERAL] No caching sql query

2013-08-21 Thread Prabhjot Sheena
Hi guys Is there a way to not cache sql query that just finished executing. I have a scenario in which i want to run a sql query but i don't want it to sit in cache. i want it to be cleared from cache as soon as it displays me the result. Is that possible Thanks

Re: [GENERAL] No caching sql query

2013-08-21 Thread Prabhjot Sheena
or is there a command to flush cache out Thx On Wed, Aug 21, 2013 at 1:28 PM, Prabhjot Sheena prabhjot.she...@rivalwatch.com wrote: Hi guys Is there a way to not cache sql query that just finished executing. I have a scenario in which i want to run a sql query but i don't want

[GENERAL] WARNING: database must be vacuumed within 8439472 transactions

2014-07-07 Thread Prabhjot Sheena
Hello We are using postgresql 8.3 database for last 5 yrs for this production database and its running fine. This is our critical database which runs 24*7. This weekend we started getting these messages HINT: To avoid a database shutdown, execute a full-database VACUUM. WARNING: database

Re: [GENERAL] WARNING: database must be vacuumed within 8439472 transactions

2014-07-07 Thread Prabhjot Sheena
...@2ndquadrant.com wrote: Prabhjot Sheena wrote: Hello We are using postgresql 8.3 database for last 5 yrs for this production database and its running fine. This is our critical database which runs 24*7. This weekend we started getting these messages HINT: To avoid a database shutdown

Re: [ADMIN] [GENERAL] WARNING: database must be vacuumed within 8439472 transactions

2014-07-07 Thread Prabhjot Sheena
many people who said it should not have been required, but it was, and it resolved my particular issues (clogs not getting removed until full vac). I would recommend it. Original message From: Prabhjot Sheena Date:07/07/2014 3:46 PM (GMT-06:00) To: Alvaro Herrera Cc

Re: [ADMIN] [GENERAL] WARNING: database must be vacuumed within 8439472 transactions

2014-07-08 Thread Prabhjot Sheena
7, 2014 at 4:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: John R Pierce pie...@hogranch.com writes: On 7/7/2014 2:14 PM, Prabhjot Sheena wrote: i will run full vacuum than and see how it goes. do make sure there aren't any OLD pending transactions hanging around. Not only regular

Re: [ADMIN] [GENERAL] WARNING: database must be vacuumed within 8439472 transactions

2014-07-08 Thread Prabhjot Sheena
, Prabhjot Sheena prabhjot.she...@rivalwatch.com wrote: So this is what i did but my problem is still not going away. i shutdown the database and started it in single user mode and issued command vacuum full The command completed but the issue still exists The thing i noticed is that whenever

[GENERAL] Checkpoint_segments optimal value

2014-07-17 Thread Prabhjot Sheena
Hello All i had a database load issue today and when i was checking logs i saw this message. I m running postgresql 8.3 db::ts:2014-07-17 09:38:21 PDT::LOG: checkpoints are occurring too frequently (26 seconds apart) db::ts:2014-07-17 09:38:21 PDT::HINT: Consider increasing the

Re: [GENERAL] Checkpoint_segments optimal value

2014-07-17 Thread Prabhjot Sheena
Thanks i have changed that to 64 and reloaded it. When i had load issue today there was this exact same query that hits the db like 50 to 60 times from different machines in 3 to 4 minutes and was taking long time to execute and was holding up the database. i did recreate an index and it started

Re: [GENERAL] Checkpoint_segments optimal value

2014-07-17 Thread Prabhjot Sheena
() tr_proc_update_job_summary AFTER UPDATE ON run FOR EACH ROW EXECUTE PROCEDURE tr_proc_update_job_summary() On Thu, Jul 17, 2014 at 12:00 PM, Potentialtech wmo...@potentialtech.com wrote: On Thu, 17 Jul 2014 11:28:04 -0700 Prabhjot Sheena prabhjot.she...@rivalwatch.com wrote: Thanks i have changed that to 64

Re: [GENERAL] Checkpoint_segments optimal value

2014-07-17 Thread Prabhjot Sheena
even though the explain plan suggests differently but its taking long long time On Thu, Jul 17, 2014 at 4:26 PM, Prabhjot Sheena prabhjot.she...@rivalwatch.com wrote: Here is the explain plan. There query time went backup up to 2 to 3 minutes from 3 second in just 2 hrs. Can anyone

Re: [GENERAL] Checkpoint_segments optimal value

2014-07-17 Thread Prabhjot Sheena
:26 PM, Prabhjot Sheena wrote: Here is the explain plan. There query time went backup up to 2 to 3 minutes from 3 second in just 2 hrs. Can anyone suggest something on how to fix this or why this is happening explain SELECT account.id, account.organization_id, run.application_id

Re: [GENERAL] Checkpoint_segments optimal value

2014-07-17 Thread Prabhjot Sheena
, 2014 at 5:10 PM, John R Pierce pie...@hogranch.com wrote: On 7/17/2014 5:01 PM, Prabhjot Sheena wrote: i just did explain analyze and currently database is running slow coz of the query explain ANALYZE SELECT account.id, account.organization_id, run.application_id, work_unit.script

[GENERAL] serious issue with age(relfrozenxid)::int.

2014-07-20 Thread Prabhjot Sheena
Hi all Most of my tables in postgresql database 8.3 is showing up this. Pls suggest me what should be done with this and if this is something really serious caesius=# select relname, age(relfrozenxid)::int from pg_class order by 2 desc ; relname

Re: [GENERAL] Checkpoint_segments optimal value

2014-07-25 Thread Prabhjot Sheena
Thanks a lot Kevin. This is what i did to improve query performance. i recreated all the indexes on work_unit table and have been running vacuum analyze through cron job 3 times a day on two tables that are in the query. The query performance is between 2 to 3 seconds now. The strange thing i

[GENERAL] error restarting DB

2014-08-27 Thread Prabhjot Sheena
Database postgresql 8.4 i shutdown the database and restarted database and now its not starting and i m getting this error [caesius@dbtest05 pg_log]$ 2014-08-27 14:14:24 PDT FATAL: database files are incompatible with server 2014-08-27 14:14:24 PDT DETAIL: The database cluster was