Re: [ADMIN] Postgres WAL Recovery Fails... And Then Works...

2013-01-15 Thread Phil Monroe
Sorry, Initial response got blocked since I replied with the logs quoted again. Also, which version of postgres are you using? PostgreSQL 9.2.1 on Ubuntu 12.04 Except in my case no number of restarts helped. You didn't say, were you explicitly copying $PGDATA or using some other mech

Re: [ADMIN] Casting bytea to varchar

2013-01-15 Thread Albe Laurenz
Tom Lane wrote: >> You cannot specify a conversion function while altering >> a column's type, you'd have to use a new column like this: > > Sure you can; that's the whole point of the USING option. > It'd look something like > > ALTER TABLE test ALTER COLUMN val TYPE varchar(255) USING convert(v

Re: [ADMIN] Casting bytea to varchar

2013-01-15 Thread Tom Lane
Albe Laurenz writes: > You cannot specify a conversion function while altering > a column's type, you'd have to use a new column like this: Sure you can; that's the whole point of the USING option. It'd look something like ALTER TABLE test ALTER COLUMN val TYPE varchar(255) USING convert(val);

Re: [ADMIN] Postgres WAL Recovery Fails... And Then Works...

2013-01-15 Thread Heikki Linnakangas
On 12.01.2013 04:32, Phil Monroe wrote: Hi Everyone, So we had to failover and do a full base backup to get our slave database back online and ran into a interesting scenario. After copying the data directory, setting up the recovery.conf, and starting the slave database, the database crashes wh

[ADMIN] Re: corrupted indexes when using base backups generated from hot standby

2013-01-15 Thread Heikki Linnakangas
On 09.01.2013 20:28, Lonni J Friedman wrote: Greetings, I'm running postgres-9.2.2 in a Linux-x86_64 cluster with 1 master and several hot standby servers. Since upgrading to 9.2.2 from 9.1.x a few months ago, I switched from generating a base backup on the master, to generating it on a dedicate

Re: [ADMIN] Casting bytea to varchar

2013-01-15 Thread Albe Laurenz
Jayashree Rajagopalan wrote: > I've to alter a column which is of datatype bytea to varchar(255). > > I used this: > ALTER TABLE tablename ALTER COLUMN columname TYPE varchar(255); > > But I'm really not sure, if the value is casted properly. > Is there a way to explicity to cast the value, while

Re: [ADMIN] Postgres WAL Recovery Fails... And Then Works...

2013-01-15 Thread Albe Laurenz
Phil Monroe wrote: > So we had to failover and do a full base backup to get our slave database > back online and ran into a > interesting scenario. After copying the data directory, setting up the > recovery.conf, and starting the > slave database, the database crashes while replaying xlogs. Howe