Re: [GENERAL] #PERSONAL# Reg: date going as 01/01/0001

2015-03-12 Thread Medhavi Mahansaria
Dear Kevin, Thanks! it worked :) Medhavi Mahansaria Tata Consultancy Services Limited Unit-VI, No.78, 79& 83, L-Centre, EPIP Industrial Estate, Whitefield Bangalore - 560066,Karnataka India Ph:- +91 80 67253769 Cell:- +91 9620053040 Mailto: medhavi.mahansa...@tcs.com Website: http://www.tcs.com

Re: [GENERAL] Strange security issue with Superuser access

2015-03-12 Thread Adrian Klaver
On 03/10/2015 08:20 AM, Andrzej Pilacik wrote: I see the issues that this person might be having. I am not doing a restore or working on an existing issue. I know, but the thread actually covers the same ground. If you want to learn exactly what happens with FKs and users in Postgres read Tom

[GENERAL] How to read refcursor column's using string column name?

2015-03-12 Thread inspector morse
How do I access a cursor's column using a string column? Example: CREATE FUNCTION write_html_select(items cursor, data_value_field text, data_text_field text) AS $$ DECLARE r RECORD; html TEXT; BEGIN FOR r in items LOOP html = ""; END LOOP; RETURN html; END; $$ LA

Re: [GENERAL] How to read refcursor column's using string column name?

2015-03-12 Thread Pavel Stehule
2015-03-10 20:56 GMT+01:00 inspector morse : > How do I access a cursor's column using a string column? > > Example: > > CREATE FUNCTION write_html_select(items cursor, data_value_field text, > data_text_field text) > AS > $$ > DECLARE r RECORD; > html TEXT; > BEGIN > FOR r in

Re: [GENERAL] Basic Question on Point In Time Recovery

2015-03-12 Thread Stéphane Schildknecht
Hello, On 11/03/2015 11:54, Robert Inder wrote: > We are developing a new software system which is now used by a number > of independent clients for gathering and storing live data as part of > their day to day work. > > We have a number of clients sharing a single server. It is running > one Po

Re: [GENERAL] Basic Question on Point In Time Recovery

2015-03-12 Thread Joseph Kregloh
Have you looked into Barman? http://www.pgbarman.org/ It does what you want. You can take a full daily backup and it keeps track of the WAL files to allow for a PITR. It also allows you to run the backup from one of your slaves. The way we have it setup is as follows: We have three servers, one ma

Re: [GENERAL] Basic Question on Point In Time Recovery

2015-03-12 Thread Robert Inder
Thanks for your comments (so far:-) I guess I'm pleased that nobody has said that I'm doing something stupid! I'll certainly look at Slony and Barman. And Stephane's suggestion of doing regular basebackups and keeping the WAL files seems neat. If I under stand it, we'd use the/a standby server

Re: [GENERAL] Basic Question on Point In Time Recovery

2015-03-12 Thread Robert Inder
Hi, Francisco, On 11 March 2015 at 17:32, Francisco Olarte wrote: > This is, build an streaming replication slave, pg_dump from the slave. If > needed, restore in the master. I really like the idea of running pg_dump on the slave, but I don't understand how I could do it. Postgres on our live

Re: [GENERAL] Basic Question on Point In Time Recovery

2015-03-12 Thread Thomas Kellerer
Robert Inder schrieb am 12.03.2015 um 12:52: > Postgres on the standby machine is continually reading those files. > But that is all it will do. "pg_dump" just says "The database is starting up". > > Could/should I have something configured differently? > > Or Is this something that has changed w

Re: [GENERAL] Benchmarking partitioning triggers and rules

2015-03-12 Thread Tomas Vondra
On 12.3.2015 04:57, Tim Uckun wrote: > I am using postgres 9.4, the default install with "brew install > postgres, no tuning at all. BTW if I use postgres.app application the > benchmarks run twice as slow! I have no idea what brew or postgres.app is. But I strongly recommend you to do some tunin

[GENERAL] Rebuild streaming replication

2015-03-12 Thread Dara Unglaube
We had two servers set up with streaming replication. I believe when we did a full vacuum analyze to the database on the master, it caused the slave to not be able to catch up (wal_keep_segments = 32, but still not enough and had archive off). I am trying to re-set up the slave to streaming replica

Re: [GENERAL] Rebuild streaming replication

2015-03-12 Thread Chander Ganesan
Hi Dara, A few things: 1. Replication is a binary process - that means that you can never set it up with using any of the pg_dump type tools (i.e., pg_dumpall/pg_dump can never be used.) 2. PostgreSQL provides a special tool to make this process super-simple: http://www.postgresql.org/docs/9.1/