Re: [GENERAL] Table Partitioning Advice Request

2009-12-17 Thread Sam Jas
Rule is not advisable, Trigger is the best solution. 

---
Thanks 
Sam Jas

--- On Thu, 17/12/09, Vincenzo Romano vincenzo.rom...@notorand.it wrote:

From: Vincenzo Romano vincenzo.rom...@notorand.it
Subject: [GENERAL] Table Partitioning Advice Request
To: pgsql-general@postgresql.org
Date: Thursday, 17 December, 2009, 11:05 AM

Hi all.

I'm planning to implement table partitioning as suggested (among
other sources) in the official documentation.
I'm using v8.4.2 at the moment.

My case is far from the general one as:
1. I'll never UPDATE or DELETE rows from partitioned tables (only INSERTs)
2. Rows will be inserted one-by-one or, in the worse case, in bunches
of two or three
3. Partitioning will be based upon TIMESTAMP ranges
4. The virtual tables should approach (and possibly go past) 100M rows
5. Most (99%) of the INSERTs (and possibly SELECTs) will actually
operate on a rather small number of partitions (hardly more than 2).

My main TABLE is like the following one:

CREATE TABLE events (
  eventtype text not null,
  item_id int8 not null,
  event_date timestamp not null default now(),
  row_date timestamp not null default now(),
  event_id serial8 primary key
);

where the partitioning would happen over the values of the event_date column.
The row_date columns is to record the row creation TIMESTAMP as events
can be created relatively to the past, the future or the current time.

In my mind a solution which is simple to maintain is to add a simple
RULE ... ON INSERT for every newly created partition table.
The TRIGGER approach, in my opinion, is much more complex to maintain
as either the body of the function needs to be rewritten as new
partitions are added, or
some external TABLE lookup is needed to choose the actual table name
to be used for a (dynamically created) INSERT.

Now the questions.

1.  As the number of RULEs will grow with the time, how will change
the efficiency of the query planner while browsing among the RULES?
2. In the case the previous answer would lead to bad news for me, is
there any better/different approach to partitioning with TRIGGERs?
3. Is there any more general advise for such approaches?

-- 
Vincenzo Romano
NON QVIETIS MARIBVS NAVTA PERITVS

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

[GENERAL] Fw: password authentication failed

2009-12-16 Thread Sam Jas

I am newbee for Bucardo. 

Whenever i am trying to add database or try to look into show all command. It 
shows me following error. 

Connecting to database 'bucardo' as user 'bucardo'
DBI
connect('dbname=bucardo;port=5433','bucardo',...) failed: FATAL: 
password authentication failed for user bucardo  at ./bucardo_ctl
line 191

/bucardo_ctl show all

../bucardo_ctl add db test

I have created bucardo user with password goat  it is a superuser. 

Kindly suggest me to
 resolve this issue. 


I am following below link. 
http://bucardo.org/wiki/Bucardo/Installation 


Thanks 
Sam Jas





   
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.


  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] Fw: password authentication failed

2009-12-16 Thread Sam Jas
yes. I have an entry in pg_hba.conf file as well I have made entry in .pgpass 
also. 

Thanks 
Sam Jas

--- On Thu, 17/12/09, A. Kretschmer andreas.kretsch...@schollglas.com wrote:

From: A. Kretschmer andreas.kretsch...@schollglas.com
Subject: Re: [GENERAL] Fw: password authentication failed
To: pgsql-general@postgresql.org
Date: Thursday, 17 December, 2009, 6:18 AM

In response to Sam Jas :
 
     I am newbee for Bucardo.
 
     Whenever i am trying to add database or try to look into show all command.
     It shows me following error.
 
     Connecting to database 'bucardo' as user 'bucardo'
     DBI connect('dbname=bucardo;port=5433','bucardo',...) failed: FATAL: 
                                       

The 'normal' port is 5432, are you sure that your database is running on
this port 5433?


     password authentication failed for user bucardo  at ./bucardo_ctl line
     191

You need a proper entry for your new database in your pg_hba.conf, do
you have such an entry?

Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: - Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] READ ONLY I/O ERROR

2009-12-02 Thread Sam Jas
We are getting the below errors after 20 or 25 days of database creation. 


ERROR: could not 
open relation 1919829/1152694/1921473: Read-only file system 
ERROR: could not read block 312320 of relation 1964206/1152694/1981329: 
Input/output error 

If we create a new database the problem is 
repeated after 20 or 25 days. Until then we don't have any issues with the new 
database. 

The size of database is very huge. We are loading millions of 
records every day and also fetching from the database is also high. Even the 
disks are not full. We are not dropping the old database. 

What is the 
reason for this issue? 

How can we ensure that it is not a database 
issue? 

We are using 
GridSQL: 1.1.0.9 
PostgreSQL 8.3 

Architecture Details: 
CentOS 5.3 64 bit Areca high point rocket raid 
3520 8 port 
32 GB RAM 

--
Thanks 
Sam Jas



--- On Mon, 30/11/09, Greg Smith g...@2ndquadrant.com wrote:

From: Greg Smith g...@2ndquadrant.com
Subject: Re: [GENERAL] READ ONLY  I/O ERROR
To: Scott Marlowe scott.marl...@gmail.com
Cc: Sam Jas samja...@yahoo.com, pgsql-general@postgresql.org
Date: Monday, 30 November, 2009, 8:29 PM

Scott Marlowe wrote:
 Areca doesn't make the high point rocket raid cards (which are medium
 quality RAID cards).
   
On a good day maybe.  HighPoint is a pretty miserable RAID vendor--in the same 
league as Promise from what I've seen as far as their Linux driver support 
goes.  In generally, and for reasons I'm not completely sure of, everyone 
selling fake RAID cards seems to be completely incompetent.  The page at 
http://linuxmafia.com/faq/Hardware/sata.html hasn't been updated in a while, 
but as of 2007 all the current HighPoint cards were still based on 
closed-source drivers only.  Completely worthless hardware IMHO.

 Sounds like your hardware is bad.  Could be mobo / cpu / memory or
 RAID card.  Does this machine hang every so often or anything?
   
It's not out of the question for this sort of problem to be caused by a bad 
driver too.  In this case it seems more likely it's a drive failure though.

-- Greg Smith    2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support
g...@2ndquadrant.com  www.2ndQuadrant.com


-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] WARNING: worker took too long to start; cancelled on VACCUM ANALYZE

2009-12-01 Thread Sam Jas
May you try to de-install AV  try to take a dump ? 

Thanks 
Dhaval 

--- On Tue, 1/12/09, a.bhattacha...@sungard.com a.bhattacha...@sungard.com 
wrote:

From: a.bhattacha...@sungard.com a.bhattacha...@sungard.com
Subject: [GENERAL] WARNING:  worker took too long to start; cancelled on VACCUM 
ANALYZE
To: pgsql-general@postgresql.org
Date: Tuesday, 1 December, 2009, 10:00 AM




 
 






Hi All,  

I am facing the below error when
executing “VACCUM ANALYZE” on the several tables and also the
entire PostgreSQL database hanging up and not responding. 

WARNING: 
worker took too long to start; cancelled 

 I have disabled my AV and
I have the modified the below parameters in my postgresql.conf file  


 shared_buffer = 1024MB  
 max_fsm_pages = 409600 
 max_fsm_relations = 5000  


I am using PostgreSQL 8.3.5 on
windows 32 bit machine. 

Any help would be highly
appreciated as this is kind of show stopper for me. 



 




  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

[GENERAL] READ ONLY I/O ERROR

2009-11-26 Thread Sam Jas
Hi Folks,

I am frequently getting read-only file system error on my server. 

We are using postgreSQL, GridSQL database. The size of database is very huge.  
Architecture Details:
CentOS 5.3 64 bit Areca high point rocket raid 3520 8 port 
32 GB RAM
assemble hardware
 
We are daily processing millions of rows and loadiing into database. We have 
marked that when we create a new database it worked fine upto 20 or 25 days. 
After that we 
are getting errors like read only file system , data is corrupted. Therefore 
we are running fsck to remove bad blocks from the disk. However, after running 
fsck also we are getting the same error. 

I will appreciate you if somebody help me to get rid out of this issue. 
 

--
Thanks 
Sam Jas 




  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] READ ONLY I/O ERROR

2009-11-26 Thread Sam Jas
How can i enable journaling as i am not so good at OS  H/W level. Can you give 
me some detail description. 

Thanks 
Sam Jas 


--- On Thu, 26/11/09, Grzegorz Jaśkiewicz gryz...@gmail.com wrote:

From: Grzegorz Jaśkiewicz gryz...@gmail.com
Subject: Re: [GENERAL] READ ONLY  I/O ERROR
To: Sam Jas samja...@yahoo.com
Cc: pgsql-general@postgresql.org
Date: Thursday, 26 November, 2009, 1:44 PM



On Thu, Nov 26, 2009 at 1:40 PM, Sam Jas samja...@yahoo.com wrote:


Hi Folks,

I am frequently getting read-only file system error on my server. 

We are using postgreSQL, GridSQL database. The size of database is very huge.  
Architecture Details:
CentOS 5.3 64 bit Areca high point rocket raid 3520 8 port 

32 GB RAM
assemble hardware
 
We are daily processing millions of rows and loadiing into database. We have 
marked that when we create a new database it worked fine upto 20 or 25 days. 
After that we 
are getting errors like read only file system , data is corrupted. Therefore 
we are running fsck to remove bad blocks from the disk. However, after running 
fsck also we are getting the same error. 


I will appreciate you if somebody help me to get rid out of this issue. this 
looks more like filesystem corruption. 
What's the FS database is running on ? presumably ext3 (cos it is centos5). 


If possible, consider checking the root cause of FS corruption, possibly test 
on other FS (xfs?).
Maybe you should also try to enable journaling, if you run in ext2/3 mode.
 

-- 
GJ




  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] Error on VACCUM ANALYZE

2009-11-26 Thread Sam Jas




Is there any other processes running over the same system
like antivirus or similar software on the machine?



Have you changed any configuration parameters around the memory size such as
shared_buffers?



--
Thanks 
Sam Jas

--- On Thu, 26/11/09, a.bhattacha...@sungard.com a.bhattacha...@sungard.com 
wrote:

From: a.bhattacha...@sungard.com a.bhattacha...@sungard.com
Subject: [GENERAL] Error on VACCUM ANALYZE
To: pgsql-general@postgresql.org
Date: Thursday, 26 November, 2009, 12:34 PM




 
 






Hi All, 

   

I am
facing the below error when executing “VACCUM ANALYZE” on the several
tables and also the entire PostgreSQL database hanging up and not responding. 

WARNING:  worker took too long to start; cancelled 

   

I am using
PostgreSQL 8.3.5 on windows 32 bit machine. 

   

Any help
would be highly appreciated. 

   

Many thanks
in advance. 

   



 




  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] Strange performance degradation

2009-11-24 Thread Sam Jas
You may use connection pooling for idle connections like pgbouncer or pgpool. 
Following link will give you details about pgbouncer  pgpool. 

https://developer.skype.com/SkypeGarage/DbProjects/PgBouncer
http://pgpool.projects.postgresql.org/pgpool-II/doc/tutorial-en.html


Hope it may help you!!! 


--
Thanks 
Sam Jas


--- On Mon, 23/11/09, Tom Lane t...@sss.pgh.pa.us wrote:

From: Tom Lane t...@sss.pgh.pa.us
Subject: Re: [GENERAL] Strange performance degradation
To: Bill Moran wmo...@potentialtech.com
Cc: Lorenzo Allegrucci lorenzo.allegru...@forinicom.it, 
pgsql-performa...@postgresql.org, pgsql-general@postgresql.org
Date: Monday, 23 November, 2009, 9:26 PM

Bill Moran wmo...@potentialtech.com writes:
 In response to Lorenzo Allegrucci lorenzo.allegru...@forinicom.it:
 Tom Lane wrote:
 Are you killing off any long-running transactions when you restart?

 Anyway, how can I get rid those idle in transaction processes?
 Can I just kill -15 them or is there a less drastic way to do it?

 Connections idle in transaction do not cause performance problems simply
 by being there, at least not when there are so few.

The idle transaction doesn't eat resources in itself.  What it does do
is prevent VACUUM from reclaiming dead rows that are recent enough that
they could still be seen by the idle transaction.  The described
behavior sounds to me like other transactions are wasting lots of cycles
scanning through dead-but-not-yet-reclaimed rows.  There are some other
things that also get slower as the window between oldest and newest
active XID gets wider.

(8.4 alleviates this problem in many cases, but the OP said he was
running 8.3.)

 If you -TERM them, any uncommitted data will be rolled back, which may
 not be what you want.  Don't -KILL them, that will upset the postmaster.

-TERM isn't an amazingly safe thing either in 8.3.  Don't you have a way
to kill the client-side sessions?

 My answer to your overarching question is that you need to dig deeper to
 find the real cause of your problem, you're just starting to isolate it.

Agreed, what you really want to do is find and fix the transaction leak
on the client side.

            regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] get a log of queries that take up a lot of CPU or take a very long time.

2009-11-24 Thread Sam Jas
select procpid, current_query, now() - query_start as duration, backend_start
from pg_stat_activity where current_query not like '%IDLE%' order by duration 
desc
limit 10;

Hope it may help you!!!.


--
Thanks 
Sam Jas


--- On Mon, 23/11/09, Tim Uckun timuc...@gmail.com wrote:

From: Tim Uckun timuc...@gmail.com
Subject: [GENERAL] get a log of queries that take up a lot of CPU or take a 
very long  time.
To: pgsql-general pgsql-general@postgresql.org
Date: Monday, 23 November, 2009, 10:41 PM

Is there a way I can get a list of the top 10 longest running queries
for the day/week/month or the top 10 queries that took the most CPU?

select * from pg_stat_activity only shows the current status.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] Processing Delay

2009-11-24 Thread Sam Jas
I suspect the issue is with the memories. 
Is it possible for you to send us the following details. 

(1) size of database you are managing on cluster ?
(2) postgresql.conf file
(3) Total RAM/ SHMMAX
(4) query which is taking more time.  


--
Thanks 
Sam Jas 


--- On Wed, 25/11/09, Michael Lawson (mshindo) mich...@sphinix.com wrote:

From: Michael Lawson (mshindo) mich...@sphinix.com
Subject: [GENERAL] Processing Delay
To: pgsql-general@postgresql.org
Date: Wednesday, 25 November, 2009, 12:38 AM

Hi,

We have a problem with a relatively small database at the moment that is 
resulting in delays times between insertions and retrievals. An update is 
applied to a single entry in a table and almost straight after that the same 
record is read. 



The problem we are encountering is a delay before we can read the updated 
value. This delay can be up to 15 seconds in some cases. 

We are inserting and retrieving data using JDBC, and the database in its 
current state is relatively small. What can we do to tweak this and reduce the 
apparent update time.



Regards

-- 
Michael Lawson (mshindo)





  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] Strange performance degradation

2009-11-20 Thread Sam Jas

Is there any idle connections exists ? 


--
Thanks 
Sam Jas


--- On Fri, 20/11/09, Lorenzo Allegrucci lorenzo.allegru...@forinicom.it 
wrote:

From: Lorenzo Allegrucci lorenzo.allegru...@forinicom.it
Subject: [GENERAL] Strange performance degradation
To: pgsql-performa...@postgresql.org
Cc: pgsql-general@postgresql.org
Date: Friday, 20 November, 2009, 9:43 AM


Hi all,

I'm experiencing a strange behavior with my postgresql 8.3:
performance is degrading after 3/4 days of running time but if I
just restart it performance returns back to it's normal value..
In normal conditions the postgres process uses about 3% of cpu time
but when is in degraded conditions it can use up to 25% of cpu time.
The load of my server is composed of many INSERTs on a table, and
many UPDATEs and SELECT on another table, no DELETEs.
I tried to run vacuum by the pg_maintenance script (Debian Lenny)
but it doesn't help. (I have autovacuum off).

So, my main question is.. how can just a plain simple restart of postgres
restore the original performance (3% cpu time)?
I can post my postgresql.conf if needed.
Thank you for your help,

-- Lorenzo

-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] Dblink to Oracle

2009-11-19 Thread Sam Jas





Following
link will give you details about “Heterogeneous
Services Generic Connectivity”.

http://oracledbnews.blogspot.com/2008/04/oracle-connections-to-non-oracle.html 


--
Thanks 
Sam Jas


--- On Thu, 19/11/09, Nicola Farina nicola.far...@info-line.it wrote:

From: Nicola Farina nicola.far...@info-line.it
Subject: [GENERAL] Dblink to Oracle
To: pgsql-general@postgresql.org
Date: Thursday, 19 November, 2009, 9:55 AM

Hello,
I am trying to ask everywhere I can, sorry if this is not the right place.
I need to create a dblink from postgresql 8.4 towards Oracle,
is it possible ? may you provide an example ?
thanks
Bye
Nicola

-- Nicola Farina

Ufficio Progetti

Info Line Srl, Via Colorno 63/a, 43122 Parma
Tel 0521-609811
Fax 0521-606924
e-mail: nicola.far...@info-line.it
sito web: http://www.info-line.it



***  AVVISO di RISERVATEZZA ***

Ai sensi del D.lgs 196/03 si precisa che il contenuto di questo messaggio è 
rivolto unicamente alle persone cui è indirizzato e può contenere informazioni 
la cui riservatezza è tutelata legalmente.
Ne sono vietati la riproduzione, la diffusione e l'uso in mancanza di 
autorizzazione  del destinatario. Se l'avete ricevuto per errore vogliate 
eliminare il messaggio in modo permanente e darcene cortesemente notizia 
rispondendo all'indirizzo:
segrete...@info-line.it



-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] Can anyone help setting up pgbouncer?

2009-11-13 Thread Sam Jas
Below is sample pgbouncer.ini file.

postgres = host=127.0.0.1 port=5432 dbname=postgres
postgres = host=127.0.0.1 dbname=postgres
postgres = host=127.0.0.1 port=5432 user=sam password=jas 
client_encoding=UNICODE datestyle=ISO connect_query='SELECT 1'

logfile = pgbouncer.log
pidfile = pgbouncer.pid
listen_addr = *
listen_port = 6000
unix_socket_dir = /tmp
auth_type = trust
auth_file = /usr/local/pg8.3/userlist.txt
admin_users = postgres
stats_users = stats, root
pool_mode = transaction 
server_reset_query = 
server_check_query = select 1
server_check_delay = 10
max_client_conn = 100
default_pool_size = 500
log_connections = 1
log_disconnections = 1
log_pooler_errors = 1
server_idle_timeout = 60
client_idle_timeout = 60
client_login_timeout = 60


sample of auth_file::  /usr/local/pg8.3/userlist.txt
postgres postgres


 then try with below command. 

pgbouncer -d -v pgbouncer.ini


Hope above info. may help you. 


--
Thanks 
Sam Jas



--- On Fri, 13/11/09, Nick nboutel...@gmail.com wrote:

From: Nick nboutel...@gmail.com
Subject: [GENERAL] Can anyone help setting up pgbouncer?
To: pgsql-general@postgresql.org
Date: Friday, 13 November, 2009, 7:10 AM

Im trying to set up pgbouncer. Installation seemed to go well but when
I try...

$ pgbouncer -d pgbouncer.ini

I get an error...

2009-11-13 02:02:35.170 7245 ERROR broken auth file
2009-11-13 02:02:35.170 7245 LOG File descriptor limit: 1024 (H:1024),
max_client_conn: 100, max fds possible: 110

Here is my pgbouncer.ini file...

databases]
pgbouncer1 = host=127.0.0.1 port=5432 dbname=pgbouncer1
[pgbouncer]
listen_port = 6543
listen_addr = 127.0.0.1
auth_type = md5
auth_file = users.txt
logfile = pgbouncer.log
pidfile = pgbouncer.pid
admin_users = pguser1

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Re: [GENERAL] DB Restart

2009-11-12 Thread Sam Jas
Thanks for your reply. 

No we are not running OOM. ulimit o/p is as below. 

[postg...@server1 ~]$ ulimit
unlimited



--- On Thu, 12/11/09, Richard Huxton d...@archonet.com wrote:

From: Richard Huxton d...@archonet.com
Subject: Re: [GENERAL] DB Restart
To: Sam Jas samja...@yahoo.com
Cc: general pgsql-general@postgresql.org
Date: Thursday, 12 November, 2009, 10:39 AM

Sam Jas wrote:
 
 
 
 Hi,
 
 We are facing issue with the RES memory. Below is the o/p of
 top command. It shows that writer process reserved 3.8g. We have observed that
 if it increased to 3.9g we need to restart the db. Otherwise it hangs.  
 Kindly suggest us the good way to figure it out this issue.   shared_buffer
 is 3 GB.   

Are you saying that you're running out of memory overall, or do you have
a ulimit issue for the postgres user?

-- 
  Richard Huxton
  Archonet Ltd

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  Connect more, do more and share more with Yahoo! India Mail. Learn more. 
http://in.overview.mail.yahoo.com/

Re: [GENERAL] DB Restart

2009-11-12 Thread Sam Jas
We are running on 64 - bit. 
Whenever the reserved memory in top command it crosses 3.9g it hangs. 
If we try to kill process (using pg_cancel_backend()) it won't kill. At last 
either 
we have to kill all process at OS level or we have to reboot the server. After 
rebooting
server everything worked perfectly fine. BTW we are using postgreSQL 8.3.2.

PID   USER  PR 
NI  VIRT   RES 
SHR S %CPU %MEM    TIME+  COMMAND

 4822 postgres  15   0
4045m 3.8g 3.8g S  0.7 12.1  
2:09.63 postgres: writer process

Thanks 
Sam


--- On Thu, 12/11/09, Richard Huxton d...@archonet.com wrote:

From: Richard Huxton d...@archonet.com
Subject: Re: [GENERAL] DB Restart
To: Sam Jas samja...@yahoo.com
Cc: general pgsql-general@postgresql.org
Date: Thursday, 12 November, 2009, 12:56 PM

Sam Jas wrote:
 Thanks for your reply. 
 
 No we are not running OOM. ulimit o/p is as below. 
 
 [postg...@server1 ~]$ ulimit
 unlimited

Unless you are running on a 32-bit system you should be alright then.

What precisely is the problem? What do you mean by the DB hangs?

-- 
  Richard Huxton
  Archonet Ltd



  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

[GENERAL] DB Restart

2009-11-11 Thread Sam Jas




Hi,

We are facing issue with the RES memory. Below is the o/p of
top command. It shows that writer process reserved 3.8g. We have observed that
if it increased to 3.9g we need to restart the db. Otherwise it hangs.  Kindly 
suggest us the good way to figure it out this issue.   shared_buffer
is 3 GB.   

 

PID   USER  PR 
NI  VIRT   RES 
SHR S %CPU %MEM    TIME+  COMMAND

 4822 postgres  15   0
4045m 3.8g 3.8g S  0.7 12.1  
2:09.63 postgres: writer process

18860 postgres 
15   0 12868 1276  816 R 
0.7  0.0   0:00.43 top

 4825 postgres  15   0
86904 2648  660 S  0.3 
0.0   0:25.32 postgres: stats
collector process

 3992 postgres  15   0
88220 1848 1104 S  0.0  0.0  
0:00.09 sshd: postg...@pts/11

 3993 postgres  15   0
66060 1628 1200 S  0.0  0.0  
0:00.02 -bash
--Thanks 
Sam Jas






  Connect more, do more and share more with Yahoo! India Mail. Learn more. 
http://in.overview.mail.yahoo.com/

Re: [GENERAL] Donwload location for PostgreSQL version 8.2.7

2009-11-09 Thread Sam Jas

Try the following link. May be help u. 

ftp://ftp-archives.postgresql.org/pub/source/v8.2.7/ 

--
Thanks 
Sam Jas



--- On Mon, 9/11/09, Anand 1008an...@gmail.com wrote:

From: Anand 1008an...@gmail.com
Subject: [GENERAL] Donwload location for PostgreSQL version 8.2.7
To: pgsql-general@postgresql.org
Date: Monday, 9 November, 2009, 11:22 AM


Hi,
 
I tried to download the PostgreSQL version 8.2.7 from the following location.
http://www.postgresql.org/ftp/binary/v8.2.7/linux/rpms/redhat/rhel-5-i386/
 
But i am not able to download any files. Every link is showing the File Not 
Found.
Please provide a link to download PostgreSQL version 8.2.7.
-
Regards
Anand





  Now, send attachments up to 25MB with Yahoo! India Mail. Learn how. 
http://in.overview.mail.yahoo.com/photos

Re: [GENERAL] Connection Problems!

2009-11-03 Thread Sam Jas
        java.lang.Exception: DB Error: org.postgresql.util.PSQLException: An 
 I/O error 
    occured while sending to the backend.


This error is about the JVM has run out of all the memory that has been 
allocated to it. 
You can overcome this by increasing java memory parameter.  Your Java 
application really needs a lot of memory (more than 128 
MB by default!).


--
Thanks 
Sam Jas



--- On Tue, 3/11/09, Đỗ Ngọc Trí Cường semin...@gmail.com wrote:

From: Đỗ Ngọc Trí Cường semin...@gmail.com
Subject: [GENERAL] Connection Problems!
To: pgsql-general@postgresql.org
Date: Tuesday, 3 November, 2009, 9:55 AM

   Dear all,

   I have an problems with my postgresql database. My Database is 8.2.5 and 
size is ~10GB with a lot of simple select,update,insert statement using indexes.
  My programs was built base on Java Environment using JDBC. In normal, there 
is no problem, the program run well, all transaction is complete, but 
sometimes, it dropped out connection in the middle of transaction and it threw 
this log:

       java.lang.Exception: DB Error: org.postgresql.util.PSQLException: An 
I/O error occured while sending to the backend.

   In server's log, there isn't any notice about that errors. That transaction 
contain about 3 insert query to 3 table and 1 update to another table.
   Besides, I'm sure that in my code, I've already set Autocommit to false. But 
when it dropped connection as that case, it was still insert/update into table, 
of course the remain query wasn't executed.

   Do you know why? Or do you have any suggestion for me?

Thanks so much,
Best Regard,

Đỗ Ngọc Trí Cường.




-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  From cricket scores to your friends. Try the Yahoo! India Homepage! 
http://in.yahoo.com/trynew

[GENERAL] Failed to update RowID generator

2009-11-02 Thread Sam Jas




Hi, 

I am first time posting on this forum. 

I am getting “Failed to update RowID generator” error
when I am trying to load data in gridsql. I checked that error came from
underlying database postgreSQL. We are using postgresql 8.2.  

ERROR [DatabaseLoad] - Error While Loading :
org.postgresql.util.PSQLException: ERROR: Can not prepare request: Failed to 
update RowID generator

ERROR [DatabaseLoad].


Your help is highly appreciated. 

 

--

Thanks

Sam Jass




  Try the new Yahoo! India Homepage. Click here. http://in.yahoo.com/trynew

Re: [GENERAL] How to use Logical Operators in Fulltext Search?

2009-10-21 Thread Sam Jas

Can we have a explain plan SELECT doc_id FROM docs WHERE tsv_title($$'magnetic 
induction'$$) OR
tsv_body($$'magnetic induction'$$) OR tsv_abstract($$'abstract'$$)


--
Thanks 
Sam


--- On Wed, 21/10/09, Gaini Rajeshwar raja.rajeshwar2...@gmail.com wrote:

From: Gaini Rajeshwar raja.rajeshwar2...@gmail.com
Subject: [GENERAL] How to use Logical Operators in Fulltext Search?
To: pgsql-general@postgresql.org mailing list pgsql-general@postgresql.org
Date: Wednesday, 21 October, 2009, 1:12 PM

Hi All,
 
I am doing a fulltext search something like this:
 
SELECT doc_id FROM docs WHERE tsv_title($$'magnetic induction'$$) OR 
tsv_body($$'magnetic induction'$$) OR tsv_abstract($$'abstract'$$)
 
It is taking approximately 100 secs to execute.
 
But running the query on individual column something like below is taking 
just few milliseconds
 
1) SELECT doc_id FROM docs WHERE tsv_title($$'magnetic induction'$$) 
 
2) SELECT doc_id FROM docs WHERE tsv_body($$'magnetic induction'$$)
 
3) SELECT doc_id FROM docs WHERE tsv_abstract($$'magnetic induction'$$)
 
 
All the above queries are taking just few milliseconds, whereas the bigining 
one taking around 100 secs.
 
Does anyone know, what could be wrong in this? Is this not the way to specify 
logical operators like AND, OR, NOT ?
 



  Try the new Yahoo! India Homepage. Click here. http://in.yahoo.com/trynew

Re: [GENERAL] How to use Logical Operators in Fulltext Search?

2009-10-21 Thread Sam Jas
Also OR operator taking time.

--- On Wed, 21/10/09, Gaini Rajeshwar raja.rajeshwar2...@gmail.com wrote:

From: Gaini Rajeshwar raja.rajeshwar2...@gmail.com
Subject: [GENERAL] How to use Logical Operators in Fulltext Search?
To: pgsql-general@postgresql.org mailing list pgsql-general@postgresql.org
Date: Wednesday, 21 October, 2009, 1:12 PM

Hi All,
 
I am doing a fulltext search something like this:
 
SELECT doc_id FROM docs WHERE tsv_title($$'magnetic induction'$$) OR 
tsv_body($$'magnetic induction'$$) OR tsv_abstract($$'abstract'$$)
 
It is taking approximately 100 secs to execute.
 
But running the query on individual column something like below is taking 
just few milliseconds
 
1) SELECT doc_id FROM docs WHERE tsv_title($$'magnetic induction'$$) 
 
2) SELECT doc_id FROM docs WHERE tsv_body($$'magnetic induction'$$)
 
3) SELECT doc_id FROM docs WHERE tsv_abstract($$'magnetic induction'$$)
 
 
All the above queries are taking just few milliseconds, whereas the bigining 
one taking around 100 secs.
 
Does anyone know, what could be wrong in this? Is this not the way to specify 
logical operators like AND, OR, NOT ?
 



  Keep up with people you care about with Yahoo! India Mail. Learn how. 
http://in.overview.mail.yahoo.com/connectmore

Re: [GENERAL] Preventing database listing?

2009-10-21 Thread Sam Jas
Below are the options that you can use to create user and assign them 
privileges according to your environment. 

Command: CREATE USER
Description: define a new database role
Syntax:
CREATE USER name [ [ WITH ] option [ ... ] ]

where option can be:

  SUPERUSER | NOSUPERUSER
    | CREATEDB | NOCREATEDB
    | CREATEROLE | NOCREATEROLE
    | CREATEUSER | NOCREATEUSER
    | INHERIT | NOINHERIT
    | LOGIN | NOLOGIN
    | CONNECTION LIMIT connlimit
    | [ ENCRYPTED | UNENCRYPTED ] PASSWORD 'password'
    | VALID UNTIL 'timestamp'
    | IN ROLE rolename [, ...]
    | IN GROUP rolename [, ...]
    | ROLE rolename [, ...]
    | ADMIN rolename [, ...]
    | USER rolename [, ...]
    | SYSID uid

postgres=# \h grant
Command: GRANT
Description: define access privileges
Syntax:
GRANT { { SELECT | INSERT | UPDATE | DELETE | REFERENCES | TRIGGER }
    [,...] | ALL [ PRIVILEGES ] }
    ON [ TABLE ] tablename [, ...]
    TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]

GRANT { { USAGE | SELECT | UPDATE }
    [,...] | ALL [ PRIVILEGES ] }
    ON SEQUENCE sequencename [, ...]
    TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]

GRANT { { CREATE | CONNECT | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }
    ON DATABASE dbname [, ...]
    TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]

GRANT { EXECUTE | ALL [ PRIVILEGES ] }
    ON FUNCTION funcname ( [ [ argmode ] [ argname ] argtype [, ...] ] ) [, ...]
    TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]

GRANT { USAGE | ALL [ PRIVILEGES ] }
    ON LANGUAGE langname [, ...]
    TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]

GRANT { { CREATE | USAGE } [,...] | ALL [ PRIVILEGES ] }
    ON SCHEMA schemaname [, ...]
    TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]

GRANT { CREATE | ALL [ PRIVILEGES ] }
    ON TABLESPACE tablespacename [, ...]
    TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]

GRANT role [, ...] TO rolename [, ...] [ WITH ADMIN OPTION ]


--
Thanks 
Sam DJ











--- On Thu, 22/10/09, Adam Rich ada...@sbcglobal.net wrote:

From: Adam Rich ada...@sbcglobal.net
Subject: [GENERAL] Preventing database listing?
To: postgresql Forums pgsql-general@postgresql.org
Date: Thursday, 22 October, 2009, 4:18 AM


This seems like a simple question that would have come up, but I'm not able to 
find an answer in google, PG docs, or PG mailing list archives.

How do I prevent a user from being able to list all databases in my cluster?  I 
want to restrict them to seeing just the databases they have connect rights to.

Thanks
Adam



-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  Now, send attachments up to 25MB with Yahoo! India Mail. Learn how. 
http://in.overview.mail.yahoo.com/photos

Re: [GENERAL] postgres doesn't start after crash

2009-10-21 Thread Sam Jas





Did you find what the reason of crash was?

Log seems that the data is corrupted as the system was
crashed. Smart way it to reload data from the valid backup and start your work.
If you don’t have a valid backup then at last touch the file (68157) and try to
restart your db. 


--
Thanks 
Sam DJ




--- On Thu, 22/10/09, Patrick Brückner payda...@gmail.com wrote:

From: Patrick Brückner payda...@gmail.com
Subject: [GENERAL] postgres doesn't start after crash
To: pgsql-general@postgresql.org
Date: Thursday, 22 October, 2009, 1:19 AM

Hi,

after a computer crash my postgres 8.2.14 installation under Windows XP SP3 
doesn't start anymore. Here is the log file:

C:\Dokumente und Einstellungen\Admin2009-10-21 23:57:09 LOG: database system 
was interrupted while in recovery at 2009-10-21 22:21:14
2009-10-21 23:57:09 HINT: This probably means that some data is corrupted and 
you will have to use the last backup for recovery.
2009-10-21 23:57:09 LOG: checkpoint record is at 24B/DD08FFA0
2009-10-21 23:57:09 LOG: redo record is at 24B/DD08FFA0; undo record is at 0/0; 
shutdown FALSE
2009-10-21 23:57:09 LOG: next transaction ID: 0/296859064; next OID: 712969
2009-10-21 23:57:09 LOG: next MultiXactId: 1; next MultiXactOffset: 0
2009-10-21 23:57:09 LOG: database system was not properly shut down; automatic 
recovery in progress
2009-10-21 23:57:09 LOG: redo starts at 24B/DD090010
2009-10-21 23:57:10 FATAL: could not count blocks of relation 1663/68065/68157: 
Permission denied
2009-10-21 23:57:10 CONTEXT: xlog redo insert: rel 1663/68065/68157; tid 165304 
9/10
2009-10-21 23:57:10 LOG: startup process (PID 3860) exited with exit code 1
2009-10-21 23:57:10 LOG: aborting startup due to startup process failure

I assume it has something to do with the FATAL: could not count blocks of 
relation 1663/68065/68157: Permission denied error. Is there any chance that I 
can repair the data without doing a backup?



-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



  Yahoo! India has a new look. Take a sneak peek http://in.yahoo.com/trynew