Re: [GENERAL] Typecast

2011-04-18 Thread Nick Raj
Thanks dude On Mon, Apr 18, 2011 at 2:25 PM, Chetan Suttraway < chetan.suttra...@enterprisedb.com> wrote: > > > On Fri, Apr 15, 2011 at 10:29 PM, Nick Raj wrote: > >> Hi, >> Can anybody tell me how to typecast data type Point into Datum? >> >> Thanks >> Nick >> > > Assuming you are referring to

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread Scott Marlowe
On Mon, Apr 18, 2011 at 9:23 PM, Phoenix Kiula wrote: >> System logs maybe?  Something about a process getting killed?  Have >> you tried turning up the verbosity of the pg logs? > > > Syslog has to be compiled with PG? How do I enable it? Where should I > look for it? > > The documentation, whene

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread Phoenix Kiula
> System logs maybe?  Something about a process getting killed?  Have > you tried turning up the verbosity of the pg logs? Syslog has to be compiled with PG? How do I enable it? Where should I look for it? The documentation, whenever it mentions "syslog", always just assumes the expression "If s

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread Scott Marlowe
On Mon, Apr 18, 2011 at 8:52 PM, Phoenix Kiula wrote: > On Tue, Apr 19, 2011 at 8:35 AM, Scott Marlowe > wrote: >> On Mon, Apr 18, 2011 at 5:44 PM, Tomas Vondra wrote: >>> >>> Still, do the file backup as described in the previous posts. You could >>> even do an online backup using pg_backup_st

Re: [GENERAL] replay doesn't catch up with receive on standby

2011-04-18 Thread Steven Parkes
> Was there idle-in-transaction in the master when the problem happened? Shouldn't have been, but that's what I was wondering, too. I didn't check. Not sure I know how to check. That was my guess and I mostly wanted to confirm that that could happen. Does seem like an edge case. I don't expect

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread Phoenix Kiula
On Tue, Apr 19, 2011 at 8:35 AM, Scott Marlowe wrote: > On Mon, Apr 18, 2011 at 5:44 PM, Tomas Vondra wrote: >> >> Still, do the file backup as described in the previous posts. You could >> even do an online backup using pg_backup_start/pg_backup_stop etc. > > As soon as you have a working file s

Re: [GENERAL] replay doesn't catch up with receive on standby

2011-04-18 Thread Fujii Masao
On Tue, Apr 19, 2011 at 10:28 AM, Steven Parkes wrote: >> Did you run query on the standby? > > Yup. Both standbys. They both responded the same way. > >> If yes, I guess that query conflict prevented >> the reply location from advancing. >> http://www.postgresql.org/docs/9.0/static/hot-standby.ht

Re: [GENERAL] replay doesn't catch up with receive on standby

2011-04-18 Thread Steven Parkes
> Did you run query on the standby? Yup. Both standbys. They both responded the same way. > If yes, I guess that query conflict prevented > the reply location from advancing. > http://www.postgresql.org/docs/9.0/static/hot-standby.html#HOT-STANDBY-CONFLICT The standbys were idle and this was a p

Re: [GENERAL] replay doesn't catch up with receive on standby

2011-04-18 Thread Fujii Masao
On Tue, Apr 19, 2011 at 9:00 AM, Steven Parkes wrote: > This is on 9.0.3: I've got two dbs running as standby to a main db. They > start up fine and seem to think they're all caught up (by /var/log logs), but > > SELECT pg_last_xlog_receive_location() AS receive, > pg_last_xlog_replay_location()

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread Scott Marlowe
On Mon, Apr 18, 2011 at 5:44 PM, Tomas Vondra wrote: > > Still, do the file backup as described in the previous posts. You could > even do an online backup using pg_backup_start/pg_backup_stop etc. As soon as you have a working file system backup, get the tw_cli utility for the 3ware cards downlo

[GENERAL] replay doesn't catch up with receive on standby

2011-04-18 Thread Steven Parkes
This is on 9.0.3: I've got two dbs running as standby to a main db. They start up fine and seem to think they're all caught up (by /var/log logs), but SELECT pg_last_xlog_receive_location() AS receive, pg_last_xlog_replay_location() AS replay; reports replay behind receive and it doesn't change

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread Tomas Vondra
Dne 18.4.2011 20:27, Phoenix Kiula napsal(a): >>> >>> What am I to do now? Even reindex is not working. I can try to drop >>> indexes and create them again. Will that help? >> >> It might help, but as someone already pointed out, you're running a >> version that's 3 years old. So do a hot file bac

Re: [GENERAL] pg_reorg

2011-04-18 Thread Vibhor Kumar
On Apr 19, 2011, at 3:40 AM, Jens Wilke wrote: > yes, we used it to reduce massive bloat after a database split and > were very satisfied. > IIRC "vacuum full" mode rewrites the indexes as well. Till 8.4 no. From 9.0 onwards yes. However VACUUM FULL still locks the table. > There's a proposal

Re: [GENERAL] Migrating Data Across Major Versions

2011-04-18 Thread Shawn Gennaria
So I was forced to re-do the migration since we had to prepare for a power outage anyway. Upon re-running the command, I found out that the reason I was receiving the notices in STDERR was due to the the long string of ordered schemas in my search path. It had a "SET search_path TO public, x, y,

Re: [GENERAL] pg_reorg

2011-04-18 Thread Jens Wilke
On Montag, 18. April 2011, Scott Mead wrote: > I've seen it, but catalog hacks always make me nervous. Anybody > else have good / bad experience to share? Hi, yes, we used it to reduce massive bloat after a database split and were very satisfied. IIRC "vacuum full" mode rewrites the indexes as

Re: [GENERAL] SSDs with Postgresql?

2011-04-18 Thread Vick Khera
On Sun, Apr 17, 2011 at 5:17 AM, Henry C. wrote: > When the super-fast SSD-based machine fails, switching to a (slower) > standard > hard-drive based machine provides continuity and buys time while we get the > primary machine back online. > The question you should ask yourself is: can my busine

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread Phoenix Kiula
On Mon, Apr 18, 2011 at 11:02 PM, wrote: >> Thanks Filip. >> >> I know which table it is. It's my largest table with over 125 million >> rows. >> >> All the others are less than 100,000 rows. Most are in fact less than >> 25,000. >> >> Now, which specific part of the table is corrupted -- if it i

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread Merlin Moncure
2011/4/18 Phoenix Kiula : > Thanks Filip. > > I know which table it is. It's my largest table with over 125 million rows. > > All the others are less than 100,000 rows. Most are in fact less than 25,000. > > Now, which specific part of the table is corrupted -- if it is row > data, then can I dump

Re: [GENERAL] pg_reorg

2011-04-18 Thread Vibhor Kumar
On Apr 19, 2011, at 2:29 AM, Raghavendra wrote: > > I've seen it, but catalog hacks always make me nervous. Anybody else have > good / bad experience to share? > > --scott > > > It is observed, double the space required for this utility. I have used it many times. Yes it requires double sp

Re: [GENERAL] pg_reorg

2011-04-18 Thread Raghavendra
> > > I've seen it, but catalog hacks always make me nervous. Anybody else have > good / bad experience to share? > > --scott > > It is observed, double the space required for this utility. Eg:- If the database is 4 gig, there should be 8gigs space. Best Regards, Raghavendra EnterpriseDB Corpora

Re: [GENERAL] pg_reorg

2011-04-18 Thread Scott Mead
On Mon, Apr 18, 2011 at 4:39 PM, Merlin Moncure wrote: > ...is an amazing tool! > > I've seen it, but catalog hacks always make me nervous. Anybody else have good / bad experience to share? --scott > merlin > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make

[GENERAL] pg_reorg

2011-04-18 Thread Merlin Moncure
...is an amazing tool! merlin -- 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] REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it

2011-04-18 Thread Tom Lane
Frank van Vugt writes: > * upon issuing 'REASSIGN OWNED BY A TO postgres', all tables and _most_ > functions changed ownership, but not all a number of functions stay > marked > as owned by A, nothing weird in the logs, the reassign looked like it > completed successfully Hmmm look i

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread tv
> Thanks Filip. > > I know which table it is. It's my largest table with over 125 million > rows. > > All the others are less than 100,000 rows. Most are in fact less than > 25,000. > > Now, which specific part of the table is corrupted -- if it is row > data, then can I dump specific parts of that

Re: [GENERAL] stymied on postgresql upgrade

2011-04-18 Thread Devrim GÜNDÜZ
On Mon, 2011-04-18 at 06:28 -0700, bkwiencien wrote: > I have postgresql 8.4 installed, and I would like to install 9.0.3. > But when I try I get: > > error: Failed dependencies: > postgresql < 7.4 conflicts with postgresql- > server-8.4.4-2PGDG.el5.i386 > > Any help would be appreciated.

[GENERAL] REASSIGN OWNED doesn't for all objects, ALTER FUNCTION seems to fix it

2011-04-18 Thread Frank van Vugt
L.S. # select version(); version --- PostgreSQL 8.4.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.4, 64-bit (1 row)

[GENERAL] stymied on postgresql upgrade

2011-04-18 Thread bkwiencien
I have postgresql 8.4 installed, and I would like to install 9.0.3. But when I try I get: error: Failed dependencies: postgresql < 7.4 conflicts with postgresql- server-8.4.4-2PGDG.el5.i386 Any help would be appreciated. Bob Kwiencien -- Sent via pgsql-general mailing list (pgsql-gener

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread Phoenix Kiula
Thanks Filip. I know which table it is. It's my largest table with over 125 million rows. All the others are less than 100,000 rows. Most are in fact less than 25,000. Now, which specific part of the table is corrupted -- if it is row data, then can I dump specific parts of that table? How? Pg_d

[GENERAL] problem with parent/child table and FKs

2011-04-18 Thread Karsten Hilbert
Hello all, since (according to the docs) PostgreSQL does not propagate INSERTs from child tables unto parent tables the below does not work, unfortunately. What is the suggested approach for this situation ? (there will be more tables like "icd10" holding other coding systems of fairly diverse na

Re: [GENERAL] Help - corruption issue?

2011-04-18 Thread Filip Rembiałkowski
Phoenix, how large (in total) is this database)? can you copy (cp -a) the data directory somewhere? I would do this just in case :-) regarding the manual recovery process: 1. you'll have to isolate corrupted table. you can do this by dumping all tables one-by-one (pg_dump -t TABLE) until you g

Re: [GENERAL] Postgres Start up Error

2011-04-18 Thread Craig Ringer
On 04/18/2011 04:01 PM, Adarsh Sharma wrote: 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 It's a really good idea to pg_dump, initdb, and restore after doing that. You don't know your database is

Re: [GENERAL] Using column aliasses in the same query

2011-04-18 Thread Tore Halvorsen
On Sun, Apr 17, 2011 at 6:00 PM, Tom Lane wrote: > Yes, we've heard that before.  Many times.  It's not going to happen, > and here's why: it's flat out contrary to the SQL specification, as well > as to the basic intuitive semantics of SQL.  The SELECT list is supposed > to be evaluated as the la

[GENERAL] Help - corruption issue?

2011-04-18 Thread Phoenix Kiula
While doing a PG dump, I seem to have a problem: ERROR: invalid memory alloc request size 4294967293 Upon googling, this seems to be a data corruption issue! ( Came about while doing performance tuning as being discussed on the PG-PERFORMANCE list: http://postgresql.1045698.n5.nabble.com/REINDEX

Re: [GENERAL] Typecast

2011-04-18 Thread Chetan Suttraway
On Fri, Apr 15, 2011 at 10:29 PM, Nick Raj wrote: > Hi, > Can anybody tell me how to typecast data type Point into Datum? > > Thanks > Nick > Assuming you are referring to c-code, Point somepoint; Datum result; result = PointPGetDatum(&somepoint) You can also checkout src/backend/utils/adt/g

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>> wrote: