Re: [ADMIN] ERROR: column "time" cannot be cast to type bigint

2011-04-20 Thread Thomas Kellerer
Saurabh Agrawal, 20.04.2011 08:38: Hi All, I am trying to alter column from "timestamp without timezone" to "bigint" but getting below error: #ALTER TABLE test ALTER column time type bigint; #ERROR: column "time" cannot be cast to type bigint Is there any other method for alter column to bigi

[ADMIN] How to uninstall PostgreSQL 8.4 on both Windows XP and Windows 7

2011-04-20 Thread Mlondolozi Ncapayi
Hi there I installed PostgreSql 8.4 and now I want to delete/ uninstall it completely to start a new fresh installation. Can you please give me clear instructions on how to do that or maybe a script that I can run. I am doing assignment using postgres your help would be highly appreciated. Mlo

[ADMIN] ERROR: column "time" cannot be cast to type bigint

2011-04-20 Thread Saurabh Agrawal
Hi All, I am trying to alter column from "timestamp without timezone" to "bigint" but getting below error: #ALTER TABLE test ALTER column time type bigint; #ERROR: column "time" cannot be cast to type bigint Is there any other method for alter column to bigint. Regards Saurabh Agrawal -- Sen

Re: [ADMIN] Reseting statistics, cluster wide

2011-04-20 Thread raghu ram
On Thu, Apr 21, 2011 at 1:01 AM, Mario Splivalo wrote: > I have set up munin monitoring that plots nice graphs using > pg_stat_bgwriter and pg_stat_database views. It has been on for quite some > time now, and the numbers those views return are too big for munin to > handle. I would like to reset

[ADMIN] Reseting statistics, cluster wide

2011-04-20 Thread Mario Splivalo
I have set up munin monitoring that plots nice graphs using pg_stat_bgwriter and pg_stat_database views. It has been on for quite some time now, and the numbers those views return are too big for munin to handle. I would like to reset those statistics. As explained by manual, pg_stat_reset() re

Re: [ADMIN] database system identifier differs between the primary and standby

2011-04-20 Thread Simon Riggs
On Wed, Apr 20, 2011 at 2:13 PM, rajibdk wrote: > We are getting the following log while configuring hot standby, > > 2011-04-20 17:34:40 ETC/GMT FATAL:  the database system is starting up > 2011-04-20 17:34:41 ETC/GMT FATAL:  database system identifier differs > between the primary and standby >

[ADMIN] Re: [GENERAL] How to uninstall PostgreSQL 8.4 on both Windows XP and Windows 7

2011-04-20 Thread raghu ram
On Wed, Apr 20, 2011 at 8:39 PM, Mlondolozi Ncapayi wrote: > Thank Sir, I have managed to uninstall it. > Now I installed PostgreSQL 8.4.4 and PostGIS 1.4.2. > > Can you please send me command prompts to load shapefiles using Windows 7. > > I want to load cities.shp into template_postgis14 [dbname

Re: [ADMIN] Orphan Temp Table After PITR

2011-04-20 Thread Kevin Grittner
[Rearranging to eliminate top-posting. List style in embedded responses.] Selva manickaraja < mavle...@gmail.com > wrote: > Kevin Grittner wrote: >> Selva manickaraja wrote: >> >>> We encountered this for the 3rd time after completing a PITR. >> >>> 2011-04-19 12:12:59 MYT LOG: autovacuum:

[ADMIN] Re: [GENERAL] How to uninstall PostgreSQL 8.4 on both Windows XP and Windows 7

2011-04-20 Thread raghu ram
On Wed, Apr 20, 2011 at 12:32 PM, Mlondolozi Ncapayi wrote: > Hi there > > I installed PostgreSql 8.4 and now I want to delete/ uninstall it > completely to start a new fresh installation. > Can you please give me clear instructions on how to do that or maybe a > script that I can run. > I am doi

Re: [ADMIN] database system identifier differs between the primary and standby

2011-04-20 Thread Vibhor Kumar
On Apr 20, 2011, at 6:46 PM, Deka, Rajib IN MAA SL wrote: > > 2011-04-20 17:34:40 ETC/GMT FATAL: the database system is starting up > 2011-04-20 17:34:41 ETC/GMT FATAL: database system identifier differs > between the primary and standby > 2011-04-20 17:34:41 ETC/GMT DETAIL: The primary's

[ADMIN] database system identifier differs between the primary and standby

2011-04-20 Thread Deka, Rajib IN MAA SL
Hello List, We are getting the following log while configuring hot standby, 2011-04-20 17:34:40 ETC/GMT FATAL: the database system is starting up 2011-04-20 17:34:41 ETC/GMT FATAL: database system identifier differs between the primary and standby 2011-04-20 17:34:41 ETC/GMT DETAIL: The prima

[ADMIN] database system identifier differs between the primary and standby

2011-04-20 Thread rajibdk
Hello List, We are getting the following log while configuring hot standby, 2011-04-20 17:34:40 ETC/GMT FATAL: the database system is starting up 2011-04-20 17:34:41 ETC/GMT FATAL: database system identifier differs between the primary and standby 2011-04-20 17:34:41 ETC/GMT DETAIL: The primar

[ADMIN] database system identifier differs between the primary and standby

2011-04-20 Thread rajibdk
Hello List, We are getting the following log while configuring hot standby, 2011-04-20 17:34:40 ETC/GMT FATAL: the database system is starting up 2011-04-20 17:34:41 ETC/GMT FATAL: database system identifier differs between the primary and standby 2011-04-20 17:34:41 ETC/GMT DETAIL: The primar

Re: [ADMIN] Dropping foreign key only if it exists

2011-04-20 Thread Lukasz Brodziak
The function: CREATE OR REPLACE FUNCTION dropfk() RETURNS integer AS $BODY$ DECLARE isDropped INTEGER; BEGIN IF exists(select 1 from pg_constraint where conname = 'my_fk') THEN ALTER TABLE my_table DROP CONSTRAINT my_fk CASCADE; isDropped = 1; ELSE isDropped = 0; END IF; return isDropped; END; $

Re: [ADMIN] Dropping foreign key only if it exists

2011-04-20 Thread Viktor Bojović
use this table: http://www.postgresql.org/docs/8.3/static/catalog-pg-constraint.html to check if it exists. On Wed, Apr 20, 2011 at 12:46 PM, Lukasz Brodziak wrote: > Hello, > > Is there a way of dropping a FK only if it exists. The thing is that I > don't know if client has this FK on the table

[ADMIN] Dropping foreign key only if it exists

2011-04-20 Thread Lukasz Brodziak
Hello, Is there a way of dropping a FK only if it exists. The thing is that I don't know if client has this FK on the table or not. -- Łukasz Brodziak "What if everyting around You isn't quite as it seems, What if all the world You think You know is an inelaborate dream When You look at Your ref

Re: [ADMIN] Streaming replication: rsync to switchover

2011-04-20 Thread rudi
On 04/20/2011 10:26 AM, rudi wrote: Database cluster state: in archive recovery and doesn't accept connections: 2011-04-20 10:17:00 CEST:[local]:u@postgres:[13099] FATAL: the database system is starting up even if is a hot standby. My fault: it seems I forgot to stop the backup in my previou

Re: [ADMIN] Streaming replication: rsync to switchover

2011-04-20 Thread rudi
On 04/19/2011 05:29 PM, rudi wrote: $ psql -c "SELECT pg_start_backup('switchover base backup')" $ rsync -av /var/lib/postgresql/9.0/main/ --delete --exclude server.crt --exclude server.key --exclude recovery.* --exclude postmaster.pid --exclude archive $FORMER_MASTER_ADDRESS:/var/lib/postgresql/