Re: [GENERAL] Understanding PG9.0 streaming replication feature

2010-12-29 Thread Ben Carbery
Thanks for the responses all, I have this working now. I had to create a base backup before copying to the standby for replication to start, but the main sticking point was actually understanding the terms and concepts involved.. I think the Binary Replication Tutorial page on the wiki basically e

[GENERAL] Automate Scripts to make for managing Large Database Servers.

2010-12-29 Thread Adarsh Sharma
Dear all, I am working on some common tasks that need to be performed on regular intervals in a large Database Servers. I find below lists of tasks that need to be performed and Please tell me if i missed some. 1. Tacking Daily, Weekly Backups. 2. Finding Space Occupied and Remaining in Data

Re: [GENERAL] what's the message: CONTEXT: PL/pgSQL function "proc_sub_b" line 7 at assignment

2010-12-29 Thread Adrian Klaver
On Wednesday 29 December 2010 2:19:40 pm Gary Fu wrote: > Hi, > > Why do I get the message in Subject when I do 'select proc_sub_b()' > under psql ? If I comment out the RAISE statement in proc_sub_a then I > don't see the message. > > Thanks, > Gary > It is just giving the context for the raisin

[GENERAL] what's the message: CONTEXT: PL/pgSQL function "proc_sub_b" line 7 at assignment

2010-12-29 Thread Gary Fu
Hi, Why do I get the message in Subject when I do 'select proc_sub_b()' under psql ? If I comment out the RAISE statement in proc_sub_a then I don't see the message. Thanks, Gary int_admin.modaps_int> select proc_sub_b(); INFO: id=11 CONTEXT: PL/pgSQL function "proc_sub_b" line 7 at assig

Re: [GENERAL] B-tree + sorting + unique constraint

2010-12-29 Thread bricklen
On Wed, Dec 29, 2010 at 5:04 PM, Jeff Davis wrote: > On Wed, 2010-12-29 at 16:39 -0800, bricklen wrote: >> -- works: >> create unique index t_uidx on t (x desc nulls last,y desc nulls last, z asc); >> drop index t_uidx; > > ... > >> -- creating the unique constraint with sorting fails: >> alter ta

Re: [GENERAL] B-tree + sorting + unique constraint

2010-12-29 Thread Jeff Davis
On Wed, 2010-12-29 at 16:39 -0800, bricklen wrote: > -- works: > create unique index t_uidx on t (x desc nulls last,y desc nulls last, z asc); > drop index t_uidx; ... > -- creating the unique constraint with sorting fails: > alter table t add constraint t_xyz_uc unique (x desc nulls last,y desc

[GENERAL] B-tree + sorting + unique constraint

2010-12-29 Thread bricklen
Hi, I have a follow-up question to my earlier question[1] about how sorting works in an index. Does creating a UNIQUE constraint not allow the aforementioned sorting capability? eg. create table t (x int, y int, z int); insert into t values (1,1,1),(2,2,2),(3,3,3),(1,2,3),(15,23,21); -- works:

Re: [GENERAL] ERROR: could not open relation base/2757655/6930168: No such file or directory -- during warm standby setup

2010-12-29 Thread bricklen
On Wed, Dec 29, 2010 at 12:11 PM, Tom Lane wrote: > bricklen writes: >> On Wed, Dec 29, 2010 at 11:35 AM, Tom Lane wrote: >>> What can you tell us about what was happening on the source DB while >>> the backup was being taken? > >> The source db has between 1000 and 3000 transactions/s, so is >>

Re: [GENERAL] ERROR: could not open relation base/2757655/6930168: No such file or directory -- during warm standby setup

2010-12-29 Thread Tom Lane
bricklen writes: > On Wed, Dec 29, 2010 at 11:35 AM, Tom Lane wrote: >> What can you tell us about what was happening on the source DB while >> the backup was being taken? > The source db has between 1000 and 3000 transactions/s, so is > reasonably volatile. The two tables in question are not ac

Re: [GENERAL] ERROR: could not open relation base/2757655/6930168: No such file or directory -- during warm standby setup

2010-12-29 Thread bricklen
On Wed, Dec 29, 2010 at 11:35 AM, Tom Lane wrote: > bricklen writes: >> After setting up a warm standby >> (pg_start_backup/rsync/pg_stop_backup), and promoting to master, we >> encountered an error in the middle of an analyze of the new standby >> db. (the standby server is a fresh server) >> [

Re: [GENERAL] ERROR: could not open relation base/2757655/6930168: No such file or directory -- during warm standby setup

2010-12-29 Thread Tom Lane
bricklen writes: > After setting up a warm standby > (pg_start_backup/rsync/pg_stop_backup), and promoting to master, we > encountered an error in the middle of an analyze of the new standby > db. (the standby server is a fresh server) > [ relfilenode doesn't match on source and standby ] What ca

Re: [GENERAL] Restore problem

2010-12-29 Thread Tim Bruce - Postgres
On Wed, December 29, 2010 10:59, John R Pierce wrote: > On 12/29/10 4:34 AM, Leif Biberg Kristensen wrote: >> Back when I used Windows, my favorite editor was EditPlus >> (http://www.editplus.com/). It isn't free, but well worth the 35 bucks. > > other good choices are Notepad++ (free) and my perso

[GENERAL] ERROR: could not open relation base/2757655/6930168: No such file or directory -- during warm standby setup

2010-12-29 Thread bricklen
Hi all, After setting up a warm standby (pg_start_backup/rsync/pg_stop_backup), and promoting to master, we encountered an error in the middle of an analyze of the new standby db. (the standby server is a fresh server) Source db: PostgreSQL 8.4.2 Standby db: PostgreSQL 8.4.6 ... INFO: analyzing

Re: [GENERAL] Restore problem

2010-12-29 Thread Adrian Klaver
On Wednesday 29 December 2010 10:52:50 am Bob Pawley wrote: > -Original Message- > From: Adrian Klaver > Sent: Wednesday, December 29, 2010 8:08 AM > To: pgsql-general@postgresql.org > Cc: Leif Biberg Kristensen > Subject: Re: [GENERAL] Restore problem > > On Wednesday 29 December 2010 4:34

Re: [GENERAL] Restore problem

2010-12-29 Thread John R Pierce
On 12/29/10 4:34 AM, Leif Biberg Kristensen wrote: Back when I used Windows, my favorite editor was EditPlus (http://www.editplus.com/). It isn't free, but well worth the 35 bucks. other good choices are Notepad++ (free) and my personal favorite, UltraEdit ($$). UEdit has some nice stuff lik

Re: [GENERAL] Restore problem

2010-12-29 Thread Bob Pawley
-Original Message- From: Adrian Klaver Sent: Wednesday, December 29, 2010 8:08 AM To: pgsql-general@postgresql.org Cc: Leif Biberg Kristensen Subject: Re: [GENERAL] Restore problem On Wednesday 29 December 2010 4:34:39 am Leif Biberg Kristensen wrote: On Wednesday 29. December 2010 1

Re: [GENERAL] Restore problem

2010-12-29 Thread Bob Pawley
-Original Message- From: Alban Hertroys Sent: Wednesday, December 29, 2010 4:03 AM To: Bob Pawley Cc: Adrian Klaver ; pgsql-general@postgresql.org Subject: Re: [GENERAL] Restore problem On 29 Dec 2010, at 4:40, Bob Pawley wrote: It seems that this has affected just the triggers - alt

Re: [GENERAL] Restore problem

2010-12-29 Thread Adrian Klaver
On Wednesday 29 December 2010 4:34:39 am Leif Biberg Kristensen wrote: > On Wednesday 29. December 2010 13.18.40 Alban Hertroys wrote: > > Learning Vim is probably time well-spent, but until you do it's > > probably not that good a tool for fixing your problem. > > > Although Vim is indeed a very p

Re: [GENERAL] Restore problem

2010-12-29 Thread Adrian Klaver
On Tuesday 28 December 2010 8:45:14 pm Bob Pawley wrote: > -Original Message- > From: Alan Hodgson > Sent: Tuesday, December 28, 2010 8:12 PM > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Restore problem > > On December 28, 2010, Adrian Klaver wrote: > > On 12/28/2010 07:40 P

Re: [GENERAL] Restore problem

2010-12-29 Thread Adrian Klaver
On Wednesday 29 December 2010 3:58:35 am Alban Hertroys wrote: > On 29 Dec 2010, at 4:29, Adrian Klaver wrote: > >>> What program are you using to look at the plain text file? > >>> > >>> > >>> Notepad > >>> > >>> Bob > >> > >> Open the file in Wordpad and see if it looks better. > >> > >> It looks

Re: [GENERAL] Any way to use refcursors from python?

2010-12-29 Thread Andrew Sullivan
On Wed, Dec 29, 2010 at 03:05:26PM +0100, Daniele Varrazzo wrote: > There is support for named cursors instead: if you use: Yeah, this I got. But. . . > just client side manipulations. So there may be some small sql you may > execute (may it be "select * from my_function()"? -- don't know the >

Re: [GENERAL] B-tree index with sorting question

2010-12-29 Thread bricklen
On Tue, Dec 28, 2010 at 11:04 PM, Guillaume Lelarge wrote: > Le 29/12/2010 05:28, Bricklen a écrit : >> On 2010-12-28, at 5:22 PM, Tom Lane wrote: >> >>> bricklen writes: In the docs at http://www.postgresql.org/docs/9.0/static/sql-createindex.html, I see that you can build index

Re: [GENERAL] Any way to use refcursors from python?

2010-12-29 Thread Daniele Varrazzo
On Wed, Dec 29, 2010 at 1:46 PM, Andrew Sullivan wrote: > Hi all, > > For a little application I'm working on (written in Python), I have a > number of potentially large result sets that I'd like to return from a > PL/pgSQL function.  My natural inclination would be to return a > refcursor.  It se

[GENERAL] Any way to use refcursors from python?

2010-12-29 Thread Andrew Sullivan
Hi all, For a little application I'm working on (written in Python), I have a number of potentially large result sets that I'd like to return from a PL/pgSQL function. My natural inclination would be to return a refcursor. It seems, however, that psycopg2 can't accept such references. Have I co

Re: [GENERAL] Restore problem

2010-12-29 Thread Leif Biberg Kristensen
On Wednesday 29. December 2010 13.18.40 Alban Hertroys wrote: > Learning Vim is probably time well-spent, but until you do it's probably not that good a tool for fixing your problem. > > Although Vim is indeed a very powerful editor, it's not particularly easy to use. Unlike your usual editors

Re: [GENERAL] Restore problem

2010-12-29 Thread Alban Hertroys
On 29 Dec 2010, at 7:54, Alan Hodgson wrote: >> I'll look at that - I'm also looking at something called Vim >> http://www.vim.org/download.php > > vim is an excellent open source text editor. Which may fix your problem if > it's related to line endings. Learning Vim is probably time well-spen

Re: [GENERAL] Restore problem

2010-12-29 Thread Alban Hertroys
On 29 Dec 2010, at 4:40, Bob Pawley wrote: > It seems that this has affected just the triggers - although that is quite > massive I will just plug away at it until it's done (Gosh, those lines were hard to find!) How did you create those functions? With notepad, or from within pgadmin? If you

Re: [GENERAL] Restore problem

2010-12-29 Thread Alban Hertroys
On 29 Dec 2010, at 4:29, Adrian Klaver wrote: >>> What program are you using to look at the plain text file? >>> >>> >>> Notepad >>> >>> Bob >>> >> >> Open the file in Wordpad and see if it looks better. >> >> It looks the same. >> >> Bob > > Well there goes that theory. Notepad is almost u

[GENERAL] Postgres Switch Over Problem

2010-12-29 Thread aaliya zarrin
Hi All, Kindly help. I am unable to get answer of my question I have sent query many times. This is again related to Signaling PG After creating the trigger file. Steps I am following are as follows, 1- Send Signa SIGUSR1 to PG 2. PG Code: Signal handler Function for catching the signal. 3. Chec

Re: [GENERAL] Restore problem

2010-12-29 Thread Jasen Betts
On 2010-12-29, Bob Pawley wrote: > Yes I was just looking at it. > > It seems that it was dumped in that form. > > Any thoughts on how that could happen?? Not that it will help in this > instance. could be EOL problem. LF vs CRLF but I expect that would be merely cosmetic. -- Sent via pgsql-g

Re: [GENERAL] DATA Location

2010-12-29 Thread Jasen Betts
On 2010-12-28, Ozz Nixon wrote: > Is it possible (and how) to implement a data path on another partition > (linux) for an existing system? And then if I do not gain anything, merging > it to the production /data path? tablespaces > Scenario of what I want to achieve (/mnt/data is already runni