Re: [GENERAL] PostgreSQL Trigger and rows updated

2012-03-31 Thread Albert
Thanks you so much! it works great now -- View this message in context: http://postgresql.1045698.n5.nabble.com/PostgreSQL-Trigger-and-rows-updated-tp5608591p5609895.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Problems with Binary Replication

2012-03-31 Thread Michael Nolan
On Sat, Mar 31, 2012 at 6:58 PM, Andreas wrote: > > > Now what could one do to prevent those sequence gaps? > There might be scenarios where it's important not to have gaps in the > numbering even when one has to switch to the standby if there is a failiour > on the master. > E.g. numbers of invo

Re: [GENERAL] loading a function from a file

2012-03-31 Thread Jasen Betts
On 2012-03-26, and wrote: > Hi all, > I would like to know how to load a user defined function from a file > written in pl/pgsql. > > I have read it on logging > psql -h host database < create_some_func.sql > but then i am forced to redo the login. Is there another way to do it? another way use

Re: [GENERAL] Problems with Binary Replication

2012-03-31 Thread Andreas
Am 31.03.2012 23:38, schrieb Tom Lane: Andreas writes: Now I added 1 row on the master. Before both sequence start values were 403. After the insert the master shows 404 as expected but the "hot-standby" shows 436. What are you doing to get it to "show" a value --- not nextval(), presumably?

Re: [HACKERS] Re: [GENERAL] pg_dump incredibly slow dumping a single schema from a large db

2012-03-31 Thread Tom Lane
Mike Roest writes: > Any idea when 9.1.4 with this change will be out so we can pull the cluster > up. Well, we just did some releases last month, so unless somebody finds a really nasty security or data-loss issue, I'd think it will be a couple of months before the next set.

Re: [GENERAL] Problems with Binary Replication

2012-03-31 Thread Tom Lane
Andreas writes: > Now I added 1 row on the master. > Before both sequence start values were 403. > After the insert the master shows 404 as expected but the "hot-standby" > shows 436. What are you doing to get it to "show" a value --- not nextval(), presumably? I think that this may be the exp

Re: [GENERAL] pg_dump incredibly slow dumping a single schema from a large db

2012-03-31 Thread Mike Roest
> > > I'm just pulling another backup using the stock 9.1.1 pg_dump to ensure > the backups are equivalent. > > Schema & data are identical between the 2 backups. the new backup passes all our tests for validating a tenant. Thank you again for the quick response! --Mike

Re: [GENERAL] pg_dump incredibly slow dumping a single schema from a large db

2012-03-31 Thread Mike Roest
> > I've committed fixes for both these issues. If you are in a position to > test with 9.1 branch tip from git, it'd be nice to have confirmation > that these patches actually cure your problem. For both of them, the > issue seems to only show up in a subset of cases, which may explain why > we'

Re: [GENERAL] pg_dump incredibly slow dumping a single schema from a large db

2012-03-31 Thread Tom Lane
I wrote: > So this is dumb; we should manage the "is the object already processed" > component of that with an O(1) check, like a bool array or some such, > rather than an O(N) search loop. > As for the getTables slowdown, the only part of that I can see that > looks to be both significant and ent

Re: [GENERAL] Problems with Binary Replication

2012-03-31 Thread Andreas
Now I added 1 row on the master. Before both sequence start values were 403. After the insert the master shows 404 as expected but the "hot-standby" shows 436. In the slaves table there is only the one row more, I just inserted on the master and it's ID column shows 404. Lets suppose - and h

[GENERAL] Problems with Binary Replication

2012-03-31 Thread Andreas
Hi, I configured a master and a hot-standby server as described here: http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial#Starting_Replication_with_only_a_Quick_Master_Restart At first everything looked ok. Then some days later I find that at least some sequences on the hot-standby are h

Re: [GENERAL] pg_dump incredibly slow dumping a single schema from a large db

2012-03-31 Thread Tom Lane
Mike Roest writes: > The file is 6 megs so I've dropped it here. > That was doing perf for the length of the pg_dump command and then a perf > report -n > http://dl.dropbox.com/u/13153/output.txt Hmm ... that's a remarkably verbose output format, but the useful part of this info seems to be just

[GENERAL] How to check the role has been granted to which role. Help me to double check . Thanks.

2012-03-31 Thread leaf_yxj
I want to check the role has been granted to which role. In my working environment, the all the normal is assigned to role group. when i issue dp, it only give me the role group privilege. So I need to check which user is in which user group. THe following is my sql to do that. Is there anybody ha

Re: [GENERAL] PostgreSQL Trigger and rows updated

2012-03-31 Thread Daniel Verite
Albert wrote: > UPDATE hello_cars SET status = new.status > WHERE OLD.ID = NEW.ID; [...] > the trigger works fine. when cars table updated, the hello_cars table > updated but status column in each row is updated and contains same new > status ! it must be updated according to ca

Re: [GENERAL] PANIC: corrupted item pointer

2012-03-31 Thread Janning Vygen
Thank you so much for still helping me... Am 30.03.2012 20:24, schrieb Jeff Davis: On Fri, 2012-03-30 at 16:02 +0200, Janning Vygen wrote: The PANIC occurred first on March, 19. My servers uptime ist 56 days, so about 4th of February. There was no power failure since i started to use this machi

[GENERAL] PostgreSQL Trigger and rows updated

2012-03-31 Thread Albert
am trying to update a table according to this trigger : CREATE TRIGGER alert AFTER UPDATE ON cars FOR EACH ROW EXECUTE PROCEDURE update_cars(); Trigger Function : CREATE FUNCTION update_cars() RETURNS 'TRIGGER' AS $BODY$ BEGIN IF (TG_OP = 'UPDATE') THEN