[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 initiali

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 noti

[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-17 Thread Prabhjot Sheena
, 2014 at 5:10 PM, John R Pierce 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

Re: [GENERAL] Checkpoint_segments optimal value

2014-07-17 Thread Prabhjot Sheena
17/2014 4: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.a

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.

Re: [GENERAL] Checkpoint_segments optimal value

2014-07-17 Thread Prabhjot Sheena
btree (start_time) "run_status" btree (status) "run_status_1" btree (status) WHERE status = 1 "run_status_part_idx" btree (status) WHERE status < 3 Triggers: run_upd_ts BEFORE INSERT OR UPDATE ON run FOR EACH ROW EXECUTE PROCEDURE set_last_update_ts()

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 p

[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 confi

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

2014-07-08 Thread Prabhjot Sheena
|198017413 >> >> Even after running the full vacuum the stats are not changing and this >> autovacuum: VACUUM public.hotel_site_market (to prevent wraparound) keeps >> coming back i m getting this message as well >> >> WARNING: database pro

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

2014-07-08 Thread Prabhjot Sheena
on this Thanks avi On Mon, Jul 7, 2014 at 4:14 PM, Tom Lane wrote: > John R Pierce 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 h

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

2014-07-07 Thread Prabhjot Sheena
re 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)

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

2014-07-07 Thread Prabhjot Sheena
s". On Mon, Jul 7, 2014 at 1:31 PM, Alvaro Herrera 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. Thi

[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] 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 qu

[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

[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] 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 like