Do, Elvis L | 1 Feb 2011 01:35

pgagent fails to start by service command on redhat enterprise 5

Dear pgsql-admin,

 

Current operation system: Red hat Enterprise version 5.0.

 

I downloaded wxGTK (2.8.0) zip file from www.wxwidgests.org  and build and install it.

I downloaded pgadmin3 (1.8.0) RPM source code from pgadmin website http://www.postgresql.org/ftp/pgadmin3/release/v1.8.0/src/ and build it. (This will include pgagent).

 

I can start pgagent from command line as without error and pgagent job schedule worked fine.

%/path to pgadmin3/bin/pgagent hostaddr=127.0.0.1 dbname=postgres user=postgres

 

However, when I tried to set up script to start pgagent when system reboot as from this link (http://www.postgresonline.com/journal/index.php?/archives/86-Yum-addendum-for-8.3.5-and-PgAgent.html) , I got error when I ran command service to start pgagent.

#service pgagent start

Starting PgAgent: /usr/local/pgadmin3/bin/pgagent: error while loading shared libraries: libwx_baseeu-2.8.so.0: cannot open shared object file: No such file or directory

 

Do you have any suggestion on this?

Thanks,

 

Elvis

 

Ray Stell | 2 Feb 2011 21:46
Picon
Favicon

unexpected pageaddr

Streaming replication standby moved from 9.0.2->9.0.3 logs this up 
startup:

 database system was shut down in recovery at 2011-02-02 15:28:51 EST
 entering standby mode
 redo starts at 0/65000170
 consistent recovery state reached at 0/66000000
 unexpected pageaddr 0/62000000 in log file 0, segment 102, offset 0
 database system is ready to accept read only connections
 streaming replication successfully connected to primary

Is the standby hurt?

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Tom Lane | 3 Feb 2011 00:32
Picon

Re: unexpected pageaddr

Ray Stell <stellr <at> cns.vt.edu> writes:
> Streaming replication standby moved from 9.0.2->9.0.3 logs this up 
> startup:

>  database system was shut down in recovery at 2011-02-02 15:28:51 EST
>  entering standby mode
>  redo starts at 0/65000170
>  consistent recovery state reached at 0/66000000
>  unexpected pageaddr 0/62000000 in log file 0, segment 102, offset 0
>  database system is ready to accept read only connections
>  streaming replication successfully connected to primary

> Is the standby hurt?

"unexpected pageaddr" is just one of the standard tests for detecting
end of WAL, so I don't think this is anything to be surprised about.
It looks to me like the standby applied all the WAL it had and then
connected to the master for more.

			regards, tom lane

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Ray Stell | 3 Feb 2011 00:43
Picon
Favicon

Re: unexpected pageaddr

On Wed, Feb 02, 2011 at 06:32:22PM -0500, Tom Lane wrote:
> Ray Stell <stellr <at> cns.vt.edu> writes:
> > Streaming replication standby moved from 9.0.2->9.0.3 logs this up 
> > startup:
> 
> >  database system was shut down in recovery at 2011-02-02 15:28:51 EST
> >  entering standby mode
> >  redo starts at 0/65000170
> >  consistent recovery state reached at 0/66000000
> >  unexpected pageaddr 0/62000000 in log file 0, segment 102, offset 0
> >  database system is ready to accept read only connections
> >  streaming replication successfully connected to primary
> 
> > Is the standby hurt?
> 
> "unexpected pageaddr" is just one of the standard tests for detecting
> end of WAL, so I don't think this is anything to be surprised about.
> It looks to me like the standby applied all the WAL it had and then
> connected to the master for more.
> 
> 			regards, tom lane

thanks, Tom.  I suppose it's the order that trips me up:

 starts at 65...
 reached a 66...
 unexpected at 62...

Maybe you could say a few words on the flow logic.  
I suppose it depends on what is meant by "start."

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Tom Lane | 3 Feb 2011 00:57
Picon

Re: unexpected pageaddr

Ray Stell <stellr <at> cns.vt.edu> writes:
> On Wed, Feb 02, 2011 at 06:32:22PM -0500, Tom Lane wrote:
>> "unexpected pageaddr" is just one of the standard tests for detecting
>> end of WAL, so I don't think this is anything to be surprised about.
>> It looks to me like the standby applied all the WAL it had and then
>> connected to the master for more.

> thanks, Tom.  I suppose it's the order that trips me up:

>  starts at 65...
>  reached a 66...
>  unexpected at 62...

Well, the point of the "unexpected pageaddr" message is exactly that the
WAL location it found in the next file wasn't the expected next location
in sequence (which would have to be something larger than 0/66000000).
This indicates that the next file isn't really new WAL, but a segment
file that was recycled (by renaming it to a higher file number) but not
yet overwritten with new data.

			regards, tom lane

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Adarsh Sharma | 3 Feb 2011 09:57

Select Command in Procedures

Dear all,

I am able to execute command successfully through CLI or pgAdmin .

create table user_news_new as select record_id,field_name,field_value,news_date from user_news where field_name in ('SOI','RelLoc','Description','Heading','news_date') and field_value != '' ;

But I don't know when I put this command in a procedure, it shows error :

CREATE FUNCTION user10() RETURNS void AS'
DECLARE
BEGIN
create table user_news_new as select record_id,field_name,field_value,news_date from user_news where field_name in ('SOI','RelLoc','Description','Heading','news_date') and field_value != '' ;
END;
' LANGUAGE 'plpgsql';


Error :

globe=# CREATE FUNCTION user10() RETURNS void AS'
globe'# DECLARE
globe'# BEGIN
globe'# create table user_news_new as select record_id,field_name,field_value,news_date from user_news where field_name in ('SOI','RelLoc','Description','Heading','news_date') and field_value != '' ;
globe'# END;
globe'# ' LANGUAGE 'plpgsql';
ERROR:  syntax error at or near "SOI"
LINE 4: ...ue,news_date from user_news where field_name in ('SOI','RelL...
                                                             ^

Please help as I stuck with this issue.


Thanks & Regards

Adarsh Sharma
Christian Ullrich | 3 Feb 2011 10:34

Re: Select Command in Procedures

* Adarsh Sharma wrote:

> I am able to execute command successfully through CLI or pgAdmin .
>
> *create table user_news_new as select
> record_id,field_name,field_value,news_date from user_news where
> field_name in ('SOI','RelLoc','Description','Heading','news_date') and
> field_value != '' ; *
>
> But I don't know when I put this command in a procedure, it shows error :
>
> CREATE FUNCTION user10() RETURNS void AS'
> DECLARE
> BEGIN
> create table user_news_new as select
> record_id,field_name,field_value,news_date from user_news where
> field_name in ('SOI','RelLoc','Description','Heading','news_date') and
> field_value != '' ;
> END;
> ' LANGUAGE 'plpgsql';

You are using single quotation marks around your function body already. 
Use dollar quoting instead.

-- 
Christian

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Gnanakumar | 3 Feb 2011 13:00

Is there a batch/bulk UPDATE syntax available?

Hi,

Is there a batch/bulk UPDATE query syntax available in PostgreSQL, similar
to multirow VALUES syntax available for INSERT?

INSERT Multirow VALUES syntax example:
INSERT INTO films (code, title, did, date_prod, kind) VALUES
    ('B6717', 'Tampopo', 110, '1985-02-10', 'Comedy'),
    ('HG120', 'The Dinner Game', 140, DEFAULT, 'Comedy');

There is a situation in my application, where I am performing lots and lots
of updates on individual rows. I am trying to figure out how to make the
updates faster.

Any other ideas/ways to make updates faster are highly appreciated.

Regards,
Gnanam

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Thomas Kellerer | 3 Feb 2011 13:31
Picon

Re: Is there a batch/bulk UPDATE syntax available?

Gnanakumar, 03.02.2011 13:00:
> Is there a batch/bulk UPDATE query syntax available in PostgreSQL, similar
> to multirow VALUES syntax available for INSERT?
>
> INSERT Multirow VALUES syntax example:
> INSERT INTO films (code, title, did, date_prod, kind) VALUES
>      ('B6717', 'Tampopo', 110, '1985-02-10', 'Comedy'),
>      ('HG120', 'The Dinner Game', 140, DEFAULT, 'Comedy');
>
> There is a situation in my application, where I am performing lots and lots
> of updates on individual rows. I am trying to figure out how to make the
> updates faster.
>
> Any other ideas/ways to make updates faster are highly appreciated.
>
> Regards,
> Gnanam
>
>
Maybe this pattern would work for you:

UPDATE my_table
    SET the_column = CASE
                       WHEN some_id_column = 1 then 100
                       WHEN some_id_column = 2 then 200
                       WHEN some_id_column = 3 then 300
                       WHEN some_id_column = 4 then 400
                       WHEN some_id_column = 5 then 500
                     END
WHERE some_id_column IN (1,2,3,4,5)

But that get's pretty nasty if you have more than just those 5 rows.

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

pasman pasmański | 3 Feb 2011 21:30
Picon

Re: Is there a batch/bulk UPDATE syntax available?

Show us explain analyze for this update.

2011/2/3, Gnanakumar <gnanam <at> zoniac.com>:
> Hi,
>
> Is there a batch/bulk UPDATE query syntax available in PostgreSQL, similar
> to multirow VALUES syntax available for INSERT?
>
> INSERT Multirow VALUES syntax example:
> INSERT INTO films (code, title, did, date_prod, kind) VALUES
>     ('B6717', 'Tampopo', 110, '1985-02-10', 'Comedy'),
>     ('HG120', 'The Dinner Game', 140, DEFAULT, 'Comedy');
>
> There is a situation in my application, where I am performing lots and lots
> of updates on individual rows. I am trying to figure out how to make the
> updates faster.
>
> Any other ideas/ways to make updates faster are highly appreciated.
>
> Regards,
> Gnanam
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>

-- 
------------
pasman

--

-- 
Sent via pgsql-admin mailing list (pgsql-admin <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


Gmane