Re: [GENERAL] Database and Table stats gets reset automatically

2016-07-25 Thread Adarsh Sharma
What is your pg_stat_tmp directory ? Just a random guess, any chances that someone played with pgstat.stat file ? Thanks, Adarsh Sharma On Mon, Jul 25, 2016 at 8:51 PM, Sameer Kumar wrote: > > > On Mon, 25 Jul 2016, 10:35 p.m. Adrian Klaver, > wrote: > >> On 07/25/2016 0

Re: R: [GENERAL] Vacuum full: alternatives?

2016-06-20 Thread Adarsh Sharma
that your deleted rows resides in the same page.It might use extra space but you will face less fragmentation problems. link : https://www.postgresql.org/docs/8.3/static/sql-createtable.html However, i have faced one problem in past where we have streaming replication setup of one master and 4 slaves. After all these tunings , autovacuum is not able to remove dead tuples and queries are getting slower and slower. After stopping all applications and streaming replicated slaves, i was able to defrag the table properly. The doc says autovacuum will not remove any dead tuples if it has any reference to those dead tuples anywhere but i am not sure how to find those dead tuples which are still being referenced :) Thanks, Adarsh Sharma

Re: [GENERAL] PROBLEM Service Alert: hostname/check_postgres_old_transaction is CRITICAL **

2014-09-23 Thread Adarsh Sharma
Thanks Jan.!! Will check and update you all the findings. Cheers On Sat, Sep 20, 2014 at 4:17 AM, Jan-Pieter Cornet wrote: > On 2014-9-19 20:33 , Adarsh Sharma wrote: > > It returns approx *311 MB* data to the client servers. > > > > root > netstat -p | grep 45355

[GENERAL] PROBLEM Service Alert: hostname/check_postgres_old_transaction is CRITICAL **

2014-09-19 Thread Adarsh Sharma
Hi all, >From the past few days i am getting this old transation alert from some of my DB slaves. I am using EDB9.2.7.18 on on CentOS6.5 ( Final ). From my app boxes i got some of the transactions remains stuck for 2-3 hours which took ~ < 60 seconds in database. Below are the details :- -- DB e

Re: [GENERAL] Join Bad Performance on different data types

2014-03-04 Thread Adarsh Sharma
On Tue, Mar 4, 2014 at 1:13 PM, Sameer Kumar wrote: > > On Tue, Mar 4, 2014 at 2:57 PM, Adarsh Sharma wrote: > >> I tried creating simple and gin indexes on the column(t_ids) but still >> not helping. Anyone has any idea or faced this before. Postgresql version >> is

[GENERAL] Join Bad Performance on different data types

2014-03-03 Thread Adarsh Sharma
Hi, Today i need to change datatype of one of my tables from *bigint to bigint[] *due to application requirements. But One of my query hangs after this change :- select DISTINCT glt.id || ':' || gtt.name as id_type, glt.name, latitude, longitude, radius, latitude || ',' || longitude as latlon fro

Re: [GENERAL] Xlogdump compiling error : undefined reference to `ber_sockbuf_io_udp'

2014-02-13 Thread Adarsh Sharma
Yes. Able to retrieve table names now. I am reviewing the xlogdump output. Is dere any way where i can understand what is the meaning of these keywords in it. [root@1002 tmp]# xlogdump pg_xlog/* > fullanalysis.txt [root@1002 tmp]# cat fullanaysis.txt | awk '{print $7}' | sort | uniq XLP_BKP_REM

Re: [GENERAL] Xlogdump compiling error : undefined reference to `ber_sockbuf_io_udp'

2014-02-12 Thread Adarsh Sharma
Below link is little helpful :- http://michael.otacoo.com/postgresql-2/postgres-9-3-feature-highlight-pg_xlogdump/ Thanks

Re: [GENERAL] Xlogdump compiling error : undefined reference to `ber_sockbuf_io_udp'

2014-02-11 Thread Adarsh Sharma
Hi Peter, Thanks for your reply. I Complied xlogdump successfully with Pg-9.2 and now i am using it to parse EDB's pg_xlog files and i am able to do that. Below are the details : [cur:1835/26FAE218, xid:471303469, rmid:9(Heap2), len/tot_len:24/6900, info:24, prev:1835/26FAD6D8] bkpblock[1]: s/d/r

[GENERAL] Xlogdump compiling error : undefined reference to `ber_sockbuf_io_udp'

2014-02-09 Thread Adarsh Sharma
Hi, Any body faced the similar issue while compiliing xlogdump :- [root@db1002 xlogdump]# make /usr/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv strlcpy.o xlogdump.o xl

Re: [GENERAL] LogStash For Analysing Postgres DB server Logs

2013-09-04 Thread Adarsh Sharma
Read Manual First : http://www.postgresql.org/docs/9.2/static/index.html However you should ask this in separate thread. This thread is related to : LogStash For Analysing Postgres DB server Logs Thanks On Thu, Sep 5, 2013 at 10:40 AM, M Tarkeshwar Rao < m.tarkeshwar@ericsson.com> wrote: >

[GENERAL] LogStash For Analysing Postgres DB server Logs

2013-09-04 Thread Adarsh Sharma
Hi, Anyone has any experience of using LogStash for analysing DB server logs real time. I used Pgbadger and find it very useful but need to test Logstash as well. Any link where I can find more details ? Thanks

Re: [GENERAL] Concatenate table name in Pl/Pgsql

2013-06-26 Thread Adarsh Sharma
Final Fix : execute 'insert into tmp'||abc|| ' select $1.*' using new; Thanks On Wed, Jun 26, 2013 at 12:18 PM, Adarsh Sharma wrote: > Able to fix but still new error :( > > > test=# CREATE OR REPLACE FUNCTION tmp_trigger_function() > test-# RETURNS TR

Re: [GENERAL] Concatenate table name in Pl/Pgsql

2013-06-25 Thread Adarsh Sharma
" does not exist LINE 1: insert into tmp20130602 values ("2013-06-02 00:00:00",Start,... ^ QUERY: insert into tmp20130602 values ("2013-06-02 00:00:00",Start,process) CONTEXT: PL/pgSQL function tmp_trigger_function() line 8 at

Re: [GENERAL] Concatenate table name in Pl/Pgsql

2013-06-25 Thread Adarsh Sharma
un 26, 2013 at 10:52 AM, Ian Lawrence Barwick < > barw...@gmail.com> > > wrote: > >> > >> 2013/6/26 Adarsh Sharma : > >> > Hi , > >> > > >> > Today i m creating a function that includes dynamic concatenation of a > >>

Re: [GENERAL] Concatenate table name in Pl/Pgsql

2013-06-25 Thread Adarsh Sharma
est=# Thanks On Wed, Jun 26, 2013 at 10:52 AM, Ian Lawrence Barwick wrote: > 2013/6/26 Adarsh Sharma : > > Hi , > > > > Today i m creating a function that includes dynamic concatenation of a > > partitioned table name as below :- > > > > test=# CREATE OR RE

Re: [GENERAL] Concatenate table name in Pl/Pgsql

2013-06-25 Thread Adarsh Sharma
EXECUTE 'insert into tmp'||abc|| 'values ( NEW.* )'; This works :)

[GENERAL] Concatenate table name in Pl/Pgsql

2013-06-25 Thread Adarsh Sharma
Hi , Today i m creating a function that includes dynamic concatenation of a partitioned table name as below :- test=# CREATE OR REPLACE FUNCTION tmp_trigger_function() test-# RETURNS TRIGGER AS $$ test$# DECLARE test$# tbl_name text; test$# abc varchar; test$# BEGIN test$# tbl_name := 'tmp'; test

Re: [GENERAL] Load Mysql table CSV into postgresql

2013-06-06 Thread Adarsh Sharma
x27;\\' CSV; ERROR: invalid input syntax for type bytea CONTEXT: COPY jobs, line 259, column wf_instance: "\0$000-120805203721153-oozie-oozi-W\0\0)<..." test=# wf_instance is single mediumblob column in the table. Cheers On Thu, Jun 6, 2013 at 11:19 PM, Adrian Klaver wrote:

[GENERAL] Load Mysql table CSV into postgresql

2013-06-06 Thread Adarsh Sharma
Hi, Today i need to load some mysql ( 5.1.58 ) tables dump in postgresql ( PG 9.2 ). I loaded few tables successfully but while loading one table i am facing below error : test=# copy jobs from '/tmp/test.csv' with DELIMITER AS ',' QUOTE '"' NULL AS '\N' ESCAPE E'\\' CSV; ERROR: invalid byte s

[GENERAL] Cat the query be tuned further ?

2013-05-31 Thread Adarsh Sharma
Hi all, I am using EDB9.2 on CentOS6.3 final server. Facing the slowness of a query that is taking more than 20 sec to execute. Below are the details : report_prod=# select pg_size_pretty(pg_total_relation_size('tableA')); pg_size_pretty 5691 MB report_prod=# select pg_size_p

Re: [GENERAL] WAL contains references to invalid pages

2013-05-21 Thread Adarsh Sharma
Try to take backups of that table & index only. If succeeded drop and recreate them. May be it fix your issue. Thanks On Thu, May 16, 2013 at 11:14 PM, JotaComm wrote: > Hello, Fabrízio > > > 2013/5/16 Fabrízio de Royes Mello > >> >> On Thu, May 16, 2013 at 11:12 AM, JotaComm wrote: >> >>> >

Re: [GENERAL] Replication terminated due to PANIC

2013-04-25 Thread Adarsh Sharma
y this PANIC message came. Anywaz thanks u all for giving your crucial time into it. Thanks On Thu, Apr 25, 2013 at 7:46 PM, Andres Freund wrote: > On 2013-04-24 19:44:25 -0700, Sergey Konoplev wrote: > > On Wed, Apr 24, 2013 at 5:05 PM, Adarsh Sharma > wrote: > > >

Re: [GENERAL] Replication terminated due to PANIC

2013-04-24 Thread Adarsh Sharma
r might be permanent. Looks like some index corruption. Thanks On Thu, Apr 25, 2013 at 8:14 AM, Sergey Konoplev wrote: > On Wed, Apr 24, 2013 at 5:05 PM, Adarsh Sharma > wrote: > > I have a Postgresql 9.2 instance running on a CentOS6.3 box.Yesterday i > > setup a hot s

[GENERAL] Replication terminated due to PANIC

2013-04-24 Thread Adarsh Sharma
Hi all, I have a Postgresql 9.2 instance running on a CentOS6.3 box.Yesterday i setup a hot standby by using pgbasebackup. Today i got the below alert from standby box : [1] (from line 412,723) 2013-04-24 23:07:18 UTC [13445]: [6-1] user= db= host= PANIC: _bt_restore_page: cannot add item to pag

Re: [GENERAL] Error while loading sql file

2011-12-26 Thread Adarsh Sharma
equence-for-encoding/ Above link shows the above encoding schemes is in utf16 format but postgresql-8.4 doesn't support it. Is there any way to store data in different encoding in a utf-8 database. Happy Holidays! Alban Hertroys wrote: On 26 Dec 2011, at 8:22, Adarsh Sharma wrote: Dear all,

[GENERAL] Error while loading sql file

2011-12-25 Thread Adarsh Sharma
Dear all, I am facing a unique issue when I try to load an sql into a postgresql database :- ERROR: invalid byte sequence for encoding "UTF8": 0xe32720 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_e

[GENERAL] Error while loading sql file

2011-12-25 Thread Adarsh Sharma
Dear all, I am facing a unique issue when I try to load an sql into a postgresql database :- ERROR: invalid byte sequence for encoding "UTF8": 0xe32720 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_e

Re: [GENERAL] How to retrieve rows with empty value in numeric(12,8) columns

2011-12-06 Thread Adarsh Sharma
try select * from table where lat IS NULL; Bèrto :-) It works, Thanks a lot Berto ! can you explain how it works or any link that explain the difference between 2 queries. Best regards Adarsh -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

Re: [GENERAL] How to retrieve rows with empty value in numeric(12,8) columns

2011-12-06 Thread Adarsh Sharma
select * from table where lat=NULL; Above query also returns 0 rows. Thanks Bèrto ëd Sèra wrote: Hi, haven't checked this personally, but first of all... what if they are simply stored as NULLs? Bèrto On 6 December 2011 13:39, Adarsh Sharma <mailto:adarsh.sha...@orkash.com

[GENERAL] How to retrieve rows with empty value in numeric(12,8) columns

2011-12-06 Thread Adarsh Sharma
Dear all, I have a table with more than 10 million rows in a postgresql database. In the table two columns are of type numeric(12,8) and contains lat lon of the locations. But in more than thousand rows values are empty. Below is the snapshot of two rows :- *"1004364";"MM";"Pye";"ENG";"Town"

[GENERAL] How to get Place Names from Lat Lon

2011-12-01 Thread Adarsh Sharma
Dear all, I have a position table that contains the lat lon of an entity from time to time. Now I want to get the place names from the respective lat lon. In the past , I am able to get the country names in which the lat lon falls because I have a table that contains the geom of all countrie

Re: [GENERAL] Select latest Timestamp values with group by

2011-10-10 Thread Adarsh Sharma
= ds.ts; Best Regards Adarsh Adarsh Sharma wrote: Any update on the below query :- I tried the below query but :- * select bb_id,lat,lon,max(dt_stamp) from gps_tracker group by bb_id; * ERROR: column "gps_tracker.lat" must appear in the GROUP BY clause or be used in an aggregate functi

Re: [GENERAL] Select latest Timestamp values with group by

2011-10-10 Thread Adarsh Sharma
of max(dt_stamp) row. Thanks Adarsh Sharma wrote: Hi Craig :- Below is the schema of my table :- CREATE TABLE demo_table ( id character varying NOT NULL, lat double precision, lon double precision, speed double precision, dt_stamp timestamp without time zone DEFAULT now(), CONSTRA

Re: [GENERAL] Select latest Timestamp values with group by

2011-10-10 Thread Adarsh Sharma
); I let u know after some work on Window functions Thanks Craig Ringer wrote: On 10/10/2011 08:32 PM, Adarsh Sharma wrote: Dear all, I need to write a query to select latest rows with timestamp values. My ID is repeated with lat lon and timestamp. I want the latest row of each ID ( group by id

[GENERAL] Select latest Timestamp values with group by

2011-10-10 Thread Adarsh Sharma
Dear all, I need to write a query to select latest rows with timestamp values. My ID is repeated with lat lon and timestamp. I want the latest row of each ID ( group by id ). Snapshot of small dataset :- "3903";"661000212";34.300312542;74.470842472;0;"2011-10-10 12:47:33.360572" "390

[GENERAL] Retrieve Future Timestamp Values

2011-10-07 Thread Adarsh Sharma
Dear all , I have these timestamp values in one table in a database. I need to fetch those rows are greater than the current time, fore.g today is Friday and i need rows of sunday, monday and so on . column A Column B "2011-10-07 09:32:51+05:30";"2011-1

Re: [GENERAL] Restoring 2 Tables From All Databases Backup

2011-10-06 Thread Adarsh Sharma
That's the bottleneck I need to solve:- Previous data & Os Version :- Postgresql-8.3 and Suse Enterprise Linux New Data & OS Version :- Postgresql-8.4 and Ubuntu 10.04 What to do know? Thanks Raymond O'Donnell wrote: On 06/10/2011 11:34, Filip Rembiałkowski wrote: To use existing

Re: [GENERAL] Postgresql Data directory Issue

2011-10-06 Thread Adarsh Sharma
using the previous directory. Thanks & regards Adarsh Sharma I donot want to upgrade Alban Hertroys wrote: On 6 October 2011 11:04, Adarsh Sharma wrote: Dear all, Any update on the issue. Apparently, pg-migrator (later called pg_upgrade) is available for pg 8.3, see here

Re: [GENERAL] Restoring 2 Tables From All Databases Backup

2011-10-06 Thread Adarsh Sharma
esoft.net>>: > 2011/10/5 Adarsh Sharma mailto:adarsh.sha...@orkash.com>>: >> About 1 month ago, I take a complete databases backup of my Database >> server >> through pg_dumpall command. >> Today I need to extract or restore only 2 tables in a dat

Re: [GENERAL] Postgresql Data directory Issue

2011-10-06 Thread Adarsh Sharma
Dear all, Any update on the issue. Thanks Adarsh Sharma wrote: Dear all, I have a database server ( 10 databases near about 110 GB) running Postgresql-.8.3 ) Today I need to format that system but I an facing the below issues :- 1. I am trying to use the previous data directory (/opt

[GENERAL] Postgresql Data directory Issue

2011-10-05 Thread Adarsh Sharma
Dear all, I have a database server ( 10 databases near about 110 GB) running Postgresql-.8.3 ) Today I need to format that system but I an facing the below issues :- 1. I am trying to use the previous data directory (/opt/PostgresPlus/8.3/data) in new Postgresql-8.4 installation but it resul

[GENERAL] Restoring 2 Tables From All Databases Backup

2011-10-04 Thread Adarsh Sharma
Dear all, About 1 month ago, I take a complete databases backup of my Database server through pg_dumpall command. Today I need to extract or restore only 2 tables in a database. Is it possible or I have to restore complete Databases again. Size of backup is 10 GB in .sql.gz format. Please l

Re: [GENERAL] Download States and Capitals Database

2011-09-28 Thread Adarsh Sharma
Craig Ringer wrote: On 28/09/11 13:43, Johan De Meersman wrote: - Original Message - From: "Adarsh Sharma" This Link gives the capitals of all countries but I need the states and their capitals in all these countries too.. But I think this is not possible becaus

Re: [GENERAL] Download States and Capitals Database

2011-09-27 Thread Adarsh Sharma
, Adarsh Sharma wrote: Dear all, I googled a lot and find data of all countries , cities , location etc from Geo Spatial websites but I am able to find the data that shows all *states & their respective capitals* in world. Please let me know if anyone as prior information about

[GENERAL] Download States and Capitals Database

2011-09-26 Thread Adarsh Sharma
Dear all, I googled a lot and find data of all countries , cities , location etc from Geo Spatial websites but I am able to find the data that shows all *states & their respective capitals* in world. Please let me know if anyone as prior information about this ? Thanks

Re: [GENERAL] pg_dump with select command

2011-09-14 Thread Adarsh Sharma
able names to the original ones in the remote server. Where as , In mysql we have -X option to specify a query while taking backups & then restore them. But I think Postgresql doesnot support this. Thanks Alban Hertroys wrote: On 14 September 2011 11:31, Adarsh Sharma <mailto

Re: [GENERAL] pg_dump with select command

2011-09-14 Thread Adarsh Sharma
Any update on below issue. Thanks Adarsh Sharma wrote: Dear all, Today I need some part ( subset ) of some tables to another database to a remote server. I need to take backup of tables after satisfying a select query. Is there any option to specify query in pg_dump command.I researched

[GENERAL] pg_dump with select command

2011-09-11 Thread Adarsh Sharma
Dear all, Today I need some part ( subset ) of some tables to another database to a remote server. I need to take backup of tables after satisfying a select query. Is there any option to specify query in pg_dump command.I researched in the manual but not able to find that. Please let me know

Re: [GENERAL] Select Output in XML format

2011-09-08 Thread Adarsh Sharma
^ Do I need to use both functions Craig Ringer wrote: On 8/09/2011 2:41 PM, Adarsh Sharma wrote: Dear all, Today I need to write the output of an postgres table into XML format. I think there is an easiest way to do this but not able to find it. http://www.postgresql.org/docs/curr

[GENERAL] Select Output in XML format

2011-09-07 Thread Adarsh Sharma
Dear all, Today I need to write the output of an postgres table into XML format. I think there is an easiest way to do this but not able to find it. In mysql there is simple query for that : mysql -X -e "select * from db_name.master" > /hdd2-1/test.xml In postgres , i find some XML data types

[GENERAL] ERD Tool

2011-08-31 Thread Adarsh Sharma
Dear all, Is there any open source ERD Tool for Postgresql Database. I find some paid tools but looking for free tools. Thanks -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Getting Table Names in a Particular Database

2011-08-30 Thread Adarsh Sharma
o the original problem. I have 10 databases with different names you have to go into the database by \c command to fetch the table names. Thanks Scott Marlowe wrote: On Tue, Aug 30, 2011 at 11:50 PM, Adarsh Sharma wrote: I understand, So there is no way to fetch table in a single query.

Re: [GENERAL] Getting Table Names in a Particular Database

2011-08-30 Thread Adarsh Sharma
in a test database from below command : select table_name from information_schema.tables where table_schema ='test';; Thanks Scott Marlowe wrote: On Tue, Aug 30, 2011 at 11:42 PM, Scott Marlowe wrote: On Tue, Aug 30, 2011 at 11:38 PM, Adarsh Sharma wrote:

Re: [GENERAL] Getting Table Names in a Particular Database

2011-08-30 Thread Adarsh Sharma
AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema' AND n.nspname !~ '^pg_toast' AND pg_catalog.pg_table_is_visible(c.oid) ORDER BY 1,2; I want to specify the database name & fetch tables from that but I think this que

[GENERAL] Getting Table Names in a Particular Database

2011-08-30 Thread Adarsh Sharma
Dear all, Today I am researching about fetching all the table names in a particular database. There is \dt command but I need to fetch it from metadata. I find some commands as below : |1. SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'; 2. |SELECT tablename F

[GENERAL] Enable PITR in Postgresql

2011-08-29 Thread Adarsh Sharma
Dear all, Today I need to enable PITR in my Postgres Production Server. I followed the below links for this purpose : http://scale-out-blog.blogspot.com/2009/02/simple-ha-with-postgresql-point-in-time.html http://www.postgresql.org/docs/8.3/static/continuous-archiving.html But I am confused abo

[GENERAL] Get data back after drop Command

2011-08-28 Thread Adarsh Sharma
Dear all, Today by mistake I issued a drop table statement in Postgresql database. Now is it possible to get that data back through WAL. My PostgresPLus Version : 8.4 OS : Linux ( CentOs ) My postgresql.conf parameters are : # WRITE AHEAD LOG #---

[GENERAL] Links to Replication

2011-08-24 Thread Adarsh Sharma
Dear all, I am using PostgresPlus-8.4SS version of Postgres on Linux & Windows Systems. Now I need to enable replication of two servers. OS may be same or different. Please let me know any useful links to do that. Thanks -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread Adarsh Sharma
AM, Adarsh Sharma mailto:adarsh.sha...@orkash.com>> wrote: Hi Michael, I think you misunderstood my problem. I have a demo system and the data is inserted in this system. Simply I want this newly inserted data to be synk to my production server. Taking pg_d

Re: [GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread Adarsh Sharma
y be other solutions too. Thanks Michael Nolan wrote: On Thu, Aug 18, 2011 at 11:03 PM, Adarsh Sharma mailto:adarsh.sha...@orkash.com>> wrote: I want a simple technique through which I update my production server easily. What I do with a similar sized database is do a pg_

Re: [GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread Adarsh Sharma
Ben Chobot wrote: On Aug 18, 2011, at 5:36 AM, Adarsh Sharma wrote: Dear All, I want some views on the below requirements : 1. I have a Postgres DB server with 25 GB database. It has more than 110 tables. I am using Postgresql 8.3 on a CentOs. 2. I have another system laptop that

[GENERAL] Syncing Data to Production DB Server

2011-08-18 Thread Adarsh Sharma
Dear All, I want some views on the below requirements : 1. I have a Postgres DB server with 25 GB database. It has more than 110 tables. I am using Postgresql 8.3 on a CentOs. 2. I have another system laptop that contains the same database but it is for testing purposes. What I want ? If

Re: [GENERAL] Pgadmin goes missing in Ubuntu

2011-08-09 Thread Adarsh Sharma
9, 2011 at 2:48 PM, Adarsh Sharma mailto:adarsh.sha...@orkash.com>> wrote: Dear all, I installed postgresql from a postgresplus-8.4.1-2-linux-x64 binary and it is working properly in the system.Yesterday i do some work in it. But today when I restart the system, p

[GENERAL] Pgadmin goes missing in Ubuntu

2011-08-09 Thread Adarsh Sharma
Dear all, I installed postgresql from a postgresplus-8.4.1-2-linux-x64 binary and it is working properly in the system.Yesterday i do some work in it. But today when I restart the system, pgadmin goes missing from Accessories > . I don't know the reason of this .Please let me know how to so

Re: [GENERAL] Granting Privileges in Postgres

2011-08-07 Thread Adarsh Sharma
Guillaume Lelarge wrote: On Mon, 2011-08-08 at 10:28 +0530, Adarsh Sharma wrote: Dear all, Today I researched on giving privileges in Postgres databases. I have 4 databases and near about 150 tables, 50-60 sequences and also some views in it. I want to give privileges to a new user in

[GENERAL] Granting Privileges in Postgres

2011-08-07 Thread Adarsh Sharma
Dear all, Today I researched on giving privileges in Postgres databases. I have 4 databases and near about 150 tables, 50-60 sequences and also some views in it. I want to give privileges to a new user in all these objects. I created a function for that but don't know how to give privileges

Re: [GENERAL] Server Not Running

2011-08-04 Thread Adarsh Sharma
Thanks Sim , I solved the problem . It's due to my pg_xlog is not mounted in the server. Cheers! Sim Zacks wrote: On 08/04/2011 08:46 AM, Adarsh Sharma wrote: Dear all, Today I do some changes in postgresql.conf &shmmax parameters as : root~# cat /proc/sys/kernel/shmall 8388608 r

[GENERAL] Server Not Running

2011-08-03 Thread Adarsh Sharma
Dear all, Today I do some changes in postgresql.conf &shmmax parameters as : root~# cat /proc/sys/kernel/shmall 8388608 root~# cat /proc/sys/kernel/shmmax 4294967296 max_connections= 80 shared_buffers= 2048MB work_mem = 32MB maintenance_work_mem = 512MB fsync=off full_page_writes=off sy

Re: [GENERAL] Backup complete

2011-07-27 Thread Adarsh Sharma
Raymond O'Donnell wrote: On 27/07/2011 10:51, Adarsh Sharma wrote: Dear all, I take backup of postgres databases with pg_dump command. But it didn't take backup of all sequences,views & functions in different databases. That's because you told it to backup only th

[GENERAL] Backup complete

2011-07-27 Thread Adarsh Sharma
Dear all, I take backup of postgres databases with pg_dump command. But it didn't take backup of all sequences,views & functions in different databases. I want to know how we can complete backup so we can get complete data after restoring from a single file. I faced errors when dumping data

[GENERAL] Would it be possible

2011-07-24 Thread Adarsh Sharma
in the E:/data directory & Binary log is also enabled. Please let me know if it is possible. It's urgent. Thanks & Regards Adarsh Sharma

[GENERAL] Schema for Website Comments

2011-07-11 Thread Adarsh Sharma
Dear all, Today I need to create a schema for my application website that allows user comments too. I think we have to maintain hierarchical data and it is very common as all sites are supporting this feature. Can somebody suggest me some guidelines to follow and some links too. Thanks -

Re: [GENERAL] Returning Rows in Procedure

2011-05-24 Thread Adarsh Sharma
/5/24 Adarsh Sharma : Dear all, I need to return the rows of a table which was also created in that procedure. I know it is very easy when the table is existed before and we can specify like this to return create function a(integer) returns setof exist_table as $$ But it gives error when the

[GENERAL] Returning Rows in Procedure

2011-05-24 Thread Adarsh Sharma
Dear all, I need to return the rows of a table which was also created in that procedure. I know it is very easy when the table is existed before and we can specify like this to return create function a(integer) returns setof exist_table as $$ But it gives error when the table is also creat

Re: [GENERAL] Convert data into horizontal from vertical form

2011-05-20 Thread Adarsh Sharma
Emanuel Calvo wrote: 2011/5/19 Adarsh Sharma : Dear all, I am not able to insert data into a table in horizontal form. The data is in below form : A show a small set of data :- c_id f_name f_value 2 k1 v1 2

[GENERAL] Unexpected exit of Postgres terminal

2011-05-19 Thread Adarsh Sharma
Dear all, Today I need to use crosstab function but Postgresql says that there is no function crosstab, so i try to install it by : bin/psql -Upostgres test -f '/opt/PostgresPlus/9.0SS/share/postgresql/contrib/tablefunc.sql' & it creates the functions. But know when I issue any query in Po

[GENERAL] Convert data into horizontal from vertical form

2011-05-19 Thread Adarsh Sharma
Dear all, I am not able to insert data into a table in horizontal form. The data is in below form : A show a small set of data :- *c_id f_name f_value* 2 k1 v1 2 k2 v2 2

Re: [GENERAL] How to do this ?

2011-05-19 Thread Adarsh Sharma
Any update on this. Please guide. Adarsh Sharma wrote: Dear all, I explain in the simple terms : Our application stores data in a format that is not best fitted to analyze. _*Table news *_category_id Record_id field_name field_value

Re: [GENERAL] How to do this ?

2011-05-18 Thread Adarsh Sharma
Esmin Gracic wrote: On Wed, May 18, 2011 at 1:25 PM, Adarsh Sharma mailto:adarsh.sha...@orkash.com>> wrote: Dear all, I explain in the simple terms : Our application stores data in a format that is not best fitted to analyze. _*Table news *_categ

[GENERAL] How to do this ?

2011-05-18 Thread Adarsh Sharma
rmation is required. I can do it myself if someone show me the path to do this Thanks & best Regards Adarsh Sharma create function user_news_new(text) returns void as $$ declare name text; cat_name alias for $1; begin CREATE TEMPORARY TABLE temptest(category_id INTEGER,category_n

Re: [GENERAL] Memcached for Database server

2011-05-16 Thread Adarsh Sharma
Rick Genter wrote: On May 16, 2011, at 10:09 PM, Adarsh Sharma wrote: Dear all, I need to research on Memcache in the next few days. What I want to know is it worth to have memcahed enable in our Mysql/ Postgres Production Servers. We have databases from 20 to 230 GB and it's no

[GENERAL] Memcached for Database server

2011-05-16 Thread Adarsh Sharma
Dear all, I need to research on Memcache in the next few days. What I want to know is it worth to have memcahed enable in our Mysql/ Postgres Production Servers. We have databases from 20 to 230 GB and it's not the OLTP just a simple OLAP where data is fetched and stored in some meaningful for

[GENERAL] Granting privileges on all tables,sequences , views, procedures

2011-05-16 Thread Adarsh Sharma
Dear all, Today I grant a user all privileges to all tables in a database by grant all privileges on svo_data_social to neha ; grant all privileges on svo_phrases to neha ; .. . . . ... Now i find it very uncomfort to grant privileges one by one table. Is there a

Re: [GENERAL] Postgres Start up Error

2011-04-18 Thread Adarsh Sharma
Thanks Chetan, The problem is solved by the below command :- :-) [postgres@ws-test 8.4SS]$ bin/pg_resetxlog -f /hdd-1/PostgresPlus/8.4SS/data Best Regards, Adarsh Sharma Chetan Suttraway wrote: On Mon, Apr 18, 2011 at 11:00 AM, Adarsh Sharma mailto:adarsh.sha...@orkash.com>>

[GENERAL] Postgres Start up Error

2011-04-17 Thread Adarsh Sharma
p due to startup process failure I try to reinstall with the same previous data directory, but it fails again. Any suggestions to solve it without losing the previous data. Thanks & best Regards, Adarsh Sharma -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

[GENERAL] Doubt in Backup

2011-03-20 Thread Adarsh Sharma
ry in \l command. However I restore it from my previous backup. Does Someone has any comments and suggestion on it. What is the reason of this strange problem. Thanks & best Regards, Adarsh Sharma

[GENERAL] Convert Simple Query into tsvector & tsquery format.

2011-03-17 Thread Adarsh Sharma
'fedayeen' || ' | ' || 'insurgent' || ' | ' || 'terrORist' || ' | ' || 'cadre' || ' | ' || 'civilians' || ' | ' || 'police' || ' | ' || 'cops' || ' | ' || 'crpf' || ' | ' || 'defence' || ' | ' || 'dsf' || ' | ' || 'ssb') ; But not able to convert and use the condition AND condition ( *AND (content like '%kill%' OR content like '%injure%')* ) also.* Please *help me , how to add this to the query. Thanks & best Regards, Adarsh Sharma

[GENERAL] How to tune this query

2011-03-07 Thread Adarsh Sharma
otal runtime: 696.856 ms What is the reason that first time it takes so much time and I know second time , Postgres uses cache . Is it possible to make it run faster at the first time too. Please let me know. Thanks & best Regards, Adarsh Sharma -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Postgresql not start during Startup

2011-03-01 Thread Adarsh Sharma
shows root@orkglo-dell:~# /etc/init.d/postgresql-8.4 status pg_ctl: no server running And then i manually execute command /etc/init.d/postgresql-8.4 start & all is running properly. But I want to start it after booting automatically. Thanks & best Regards, Adarsh Sharma -- Sent via

[GENERAL] Tool for shifting tables from Mysql to Postgresql

2011-03-01 Thread Adarsh Sharma
e6c65 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". ERROR: invalid byte sequence I think a tool would ease that work. Thanks & best Regards, Adarsh Sharma -- Sent via pg

[GENERAL] Backup Fails

2011-02-22 Thread Adarsh Sharma
pg_dump: [archiver (db)] connection to database "pdc_uima_olap" failed: FATAL: could not write init file [root@s8-mysd-2 8.4SS]# Don't know the actual reason of this as remainning databases are backed up correctly. Please guide with some suggestion to overcome it. Thanks & b

[GENERAL] Mysql to Postgresql

2011-02-22 Thread Adarsh Sharma
Dear all, Today I need to back up a mysql database and restore in Postgresql database but I don't know how to achieve this accurately. Can anyone kindly describe me the way to do this. Thanks & best Regards, Adarsh Sharma -- Sent via pgsql-general mailing list (pgsq

[GENERAL] PostgresPlus Windows Installation Error

2011-02-17 Thread Adarsh Sharma
found some recommendations: I chang C:/Windows/System32/Drvers/etc/host file to have below line 127.0.0.1 localhost ::1 localhost. Please guide how to resolve it. Thanks & Best regards, Adarsh Sharma

[GENERAL] Tablespace Issue

2011-02-17 Thread Adarsh Sharma
tablespace and remain old as it is. Also, Can I delete the old tablespace now . Thanks & Best Regards, Adarsh Sharma -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] pg_dump with select output

2011-02-16 Thread Adarsh Sharma
-q -w"internalurl_id between 1 and 30" bicrawler internalurl > /root/Desktop/internal_url.sql -w option is used for executing select command . But don't know how this is achieved through pg_dump command. Please help. Thanks & best Regards, Adarsh Sharma -- Sent via

[GENERAL] Auto-Increment in Postgres

2011-02-11 Thread Adarsh Sharma
2 3 4 5 6 7 and next data is inserted right at 8 . I follow these steps *alter table meta_test drop column metadataid; alter table meta_test add metadataid serial;* But this adds the column at the end but i want to it as primary key. Please help how to achieve it. Thanks & best Regards Adarsh Sharma

[GENERAL] Select Command in Procedures

2011-02-03 Thread Adarsh Sharma
UAGE 'plpgsql'; ERROR: syntax error at or near "SOI" LINE 4: ...ue,news_date from user_news where field_name in ('SOI','RelL... ^ Please help as I stuck with this issue. Thanks & Regards Adarsh Sharma

[GENERAL] Changing SHMMAX

2011-02-02 Thread Adarsh Sharma
Dear all, Today i try to perform some performance tuning for Postgresql database. I want to change my shared memory permanently. I have 16 GB RAM. Please guide me how to change it permanently and what is the correct value for it. I am going for 8GB . Thanks & Regards Adarsh Sh

Re: [GENERAL] Installation Issue of PostgresPlus-9.0

2011-02-02 Thread Adarsh Sharma
-base sudo apt-get install ncurses-bin sudo apt-get install ncurses-term sudo apt-get install libncurses5 (and most importantly) sudo apt-get install libncurses5-dev But still I face the same issue. Any comments. Adarsh Sharma wrote: Dear all, I am trying to install postgresplus on a

  1   2   >