[ADMIN] Reduce the size of the archived-log directory

2013-03-28 Thread Hoàng Thanh Toàn - DB
Dear all, Please help me. Please show me how to reduce the size of the archived-log directory. My postgres database only get 4gbyte but the archived-log directory reaches several tens of gigabyte in one day. please give me some advice. Thanks a lot. -- Best Regards, Hoàng Thanh Toàn,

[ADMIN] Reduce the size of the archived-log directory

2013-03-28 Thread Hoàng Thanh Toàn - DB
Dear all, Please help me. Please show me how to reduce the size of the archived-log directory. My postgres database only get 4gbyte but the archived-log directory reaches several tens of gigabyte in one day. please give me some advice. Thanks a lot.

Re: [ADMIN] Reduce the size of the archived-log directory

2013-03-28 Thread Vasilis Ventirozos
The size of your directory will increase by 16mb on every checkpoint (16Mb or 5 mins) so, even if your DB is completely idle you will get 16Mb per 5 mins, make the calculations and you'll see the space you need per day. Vasilis Ventirozos On Thu, Mar 28, 2013 at 8:54 AM, Hoàng Thanh Toàn - DB

[ADMIN] VACUUM ANALYZE AND ANALYZE ISSUE

2013-03-28 Thread suhas.basavaraj12
Hi, I was running vacuum analyze on one of heavily bloated table. After the vacuum analyze completed . I did explain on a query . It was going for hash join and sequential scan. Then i issues ANALYZE BLOATED_TABLE; Then when ran explain query , surprisingly it was going for index scan . This

Re: [ADMIN] Dump only functions

2013-03-28 Thread Keith Ouellette
Thank you. I tried pg_extractor and it work almost perfect. I have just one question. We do overloading of a function name (using different parameters) and I think it puts all overlaoded functions in the same file (those with the same file name that is). Is there a way to separate them?

Re: [ADMIN] Dump only functions

2013-03-28 Thread Vasilis Ventirozos
something like this would probably work too for a in `echo SELECT p.proname FROM pg_catalog.pg_proc p LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace WHERE pg_catalog.pg_function_is_visible(p.oid) AND n.nspname 'pg_catalog' AND n.nspname 'information_schema'|psql -A -t test`; do

Re: [ADMIN] VACUUM ANALYZE AND ANALYZE ISSUE

2013-03-28 Thread Kevin Grittner
suhas.basavaraj12 suha...@verse.in wrote: This was observed in postgres 9.0.1. You might want to review the bug fixes in 9.0 maintenance releases and see if any of them could be responsible for what you saw: http://www.postgresql.org/docs/9.0/static/release-9-0-2.html

[ADMIN] select exact term

2013-03-28 Thread Marc Fromm
Is there a way to create a select statement that will select a record if the exact term is found in a field that contains the text to describe something? If I create a select statement using WHERE description LIKE 'art' I get every record that has words like depart, start and so on. If I create

Re: [ADMIN] select exact term

2013-03-28 Thread Douglas J Hunley
On Thu, Mar 28, 2013 at 1:51 PM, Marc Fromm marc.fr...@wwu.edu wrote: Is there a way to create a select statement that will select a record if the exact term is found in a field that contains the text to describe something? ** ** If I create a select statement using WHERE description

Re: [ADMIN] select exact term

2013-03-28 Thread Craig James
On Thu, Mar 28, 2013 at 10:51 AM, Marc Fromm marc.fr...@wwu.edu wrote: Is there a way to create a select statement that will select a record if the exact term is found in a field that contains the text to describe something? ** ** If I create a select statement using WHERE description

Re: [ADMIN] select exact term

2013-03-28 Thread Tom Lane
Marc Fromm marc.fr...@wwu.edu writes: I am struggling with the syntax. In php I create my where clause as shown, using ~* for case insensitive: $search = art; $strSQL2 = WHERE (title ~* [[::]]'$search'[[::]] OR description ~* [[::]]'$search'[[::]]) ; When executed zero records are

Re: [ADMIN] select exact term

2013-03-28 Thread Marc Fromm
Thanks Tom, I just discovered that. I reworked the php so the quotes surround the regexp. -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Thursday, March 28, 2013 1:07 PM To: Marc Fromm Cc: Craig James; pgsql-admin@postgresql.org Subject: Re: [ADMIN] select exact

Re: [ADMIN] select exact term

2013-03-28 Thread Sergey Konoplev
On Thu, Mar 28, 2013 at 10:51 AM, Marc Fromm marc.fr...@wwu.edu wrote: Is there a way to create a select statement that will select a record if the exact term is found in a field that contains the text to describe something? In addition to what has been suggested before you may find interesting

[ADMIN] Grant tables cascade to sequence?

2013-03-28 Thread Rural Hunter
Hi, I encounter the same issue often: Granted update/insert to an user but forgot to grant it on the related sequence. It's hard to understand that an user has write access on table but not on necessary sequences. I think the grant on tables should cascade to related sequences. What do you