[GENERAL] Postgresql on EC2/EBS in production?

2010-04-25 Thread Nikhil G. Daddikar
Folks, I was wondering if any of you are using (or tried to use) PG+EC2/EBS on a production system. Are any best-practices. Googling didn't help much. A few articles I came across scared me a bit. Thanks. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Deadlock occur while creating new table to be used in partition.

2010-04-25 Thread Yan Cheng CHEOK
I post a complete code for this stored procedure, so that I won't miss out any hint which may cause this deadlock to occur. CREATE OR REPLACE FUNCTION get_existing_or_create_lot(text, text, text[], text[]) RETURNS TABLE(_lot_id int, _start_timestamp double precision, _end_timestamp double pr

[GENERAL] PostgreSQL Live CD for 8.4.3 released

2010-04-25 Thread Devrim GÜNDÜZ
I released new version of my PostgreSQL 8.4 live CD, which is based on Fedora 12. It includes the PostgreSQL related packages that I build for http://yum.pgrpms.org, along with PostgreSQL 8.4.3. Details are here: http://pglivecd.org http://yum.pgrpms.org/livecd.php You can add an encrypted home

Re: [GENERAL] Deadlock occur while creating new table to be used in partition.

2010-04-25 Thread Tom Lane
Yan Cheng CHEOK writes: > Currently, I have a stored procedure(get_existing_or_create_lot), which will > be called by 2 or more processes simultaneously. > Every process will have a unique lot name. What the store procedure does it > 1) Insert lot name into "lot" table. A unique lot id will be r

[GENERAL] Deadlock occur while creating new table to be used in partition.

2010-04-25 Thread Yan Cheng CHEOK
Currently, I have a stored procedure(get_existing_or_create_lot), which will be called by 2 or more processes simultaneously. Every process will have a unique lot name. What the store procedure does it 1) Insert lot name into "lot" table. A unique lot id will be returned after insertion into "l

Re: [GENERAL] Lock table, best option?

2010-04-25 Thread Josh Kupershmidt
On Sat, Apr 24, 2010 at 4:46 PM, Andre Lopes wrote: > I need to do a SELECT and an UPDATE, but I will have concurrent processes > doing the same task. > > How can I prevent that the concurrent task don't have the same results in > the SELECT? Locking a table? How can I do that? It sounds like you

[GENERAL] Help with pgpool-dbt2 database

2010-04-25 Thread Megha
Hi I am new with pgpool ,postgres and Database systems. I am using pgpool II2.1, postgresql 8.3.9 and DBT2 benchmark. Can anyone please tell me what kind of changes I need to make in pgpool II2.1 config file and postgresql config file to run it with DBT2 databsae system? I am running pgpool with

Re: [GENERAL] Plpgsql function syntax error at first coalesce statement

2010-04-25 Thread Tom Lane
Jeff Ross writes: > On 04/25/10 14:20, Tom Lane wrote: >> Uh, you're using that as the destination for the FOR loop's SELECT. >> What exactly is the purpose of having a second SELECT within the loop? > How else do I get the results I want--name, address, city, state, and so > on through the list

Re: [GENERAL] Plpgsql function syntax error at first coalesce statement

2010-04-25 Thread Jeff Ross
On 04/25/10 14:20, Tom Lane wrote: Jeff Ross writes: Now I'm *really* confused. I thought the table structure I created at the beginning of the function was where the results would be returned to. Uh, you're using that as the destination for the FOR loop's SELECT. What exactly is the purpose

Re: [GENERAL] Plpgsql function syntax error at first coalesce statement

2010-04-25 Thread Tom Lane
Jeff Ross writes: > Now I'm *really* confused. I thought the table structure I created at > the beginning of the function was where the results would be returned > to. Uh, you're using that as the destination for the FOR loop's SELECT. What exactly is the purpose of having a second SELECT with

Re: [GENERAL] Plpgsql function syntax error at first coalesce statement

2010-04-25 Thread Raymond O'Donnell
On 25/04/2010 20:50, Jeff Ross wrote: > Now I'm *really* confused. I thought the table structure I created at > the beginning of the function was where the results would be returned > to. I tried a variety of queries including select into and create table > but they didn't work either. I think

Re: [GENERAL] Plpgsql function syntax error at first coalesce statement

2010-04-25 Thread Jeff Ross
On 04/25/10 12:32, Tom Lane wrote: Jeff Ross writes: I'm trying to write my first plpgsql function and I'm running into a problem that may or may not have to do with a coalesce statement. No, it's not the coalesce ... When I try to run this I get the following error: jr...@acer:/var/www/

Re: [GENERAL] Help me stop postgres from crashing.

2010-04-25 Thread Samuel
On Apr 24, 3:53 pm, thombr...@gmail.com (Thom Brown) wrote: > On 24 April 2010 18:48, Sam wrote: > > > > > > > Hi, > > > I am a web developer, I've been using postgesql for a few years but > > administratively I am a novice. > > > A particular web application I am working has a staging version > >

Re: [GENERAL] Help me stop postgres from crashing.

2010-04-25 Thread Samuel
On Apr 24, 3:53 pm, thombr...@gmail.com (Thom Brown) wrote: > On 24 April 2010 18:48, Sam wrote: > > > > > > > Hi, > > > I am a web developer, I've been using postgesql for a few years but > > administratively I am a novice. > > > A particular web application I am working has a staging version > >

Re: [GENERAL] Help me stop postgres from crashing.

2010-04-25 Thread Samuel
On Apr 24, 4:13 pm, t...@sss.pgh.pa.us (Tom Lane) wrote: > Sam writes: > > A particular web application I am working has a staging version > > running one a vps, and a production version running on another vps. > > They both get about the same usage, but the production version keeps > > crashing a

Re: [GENERAL] ALTER Bigserial error

2010-04-25 Thread Tom Lane
"Little, Douglas" writes: > I'm trying to alter in a bigserial on GP/PG 8.1 I'm getting the error > ERROR: type "bigserial" does not exist > SQL state: 42704 > I understand that bigserial isn't a 'true' type, that it's a notational > convenience. > And that I can alter in the default. > But i

Re: [GENERAL] Plpgsql function syntax error at first coalesce statement

2010-04-25 Thread Tom Lane
Jeff Ross writes: > I'm trying to write my first plpgsql function and I'm running into a > problem that may or may not have to do with a coalesce statement. No, it's not the coalesce ... > When I try to run this I get the following error: > jr...@acer:/var/www/stars/sql $ psql -f view_all_trai

Re: [GENERAL] Problem saving emails to database.

2010-04-25 Thread Raymond O'Donnell
On 25/04/2010 18:31, Andre Lopes wrote: > Let me explain the problem... I'am sending text emails, and to break the > lines of the message I use "\n". The first problem was to stores the > "\". To INSERT "\n" I need to write "\\n". When I do a SELECT I see "\n" > but when I dump the database in the

[GENERAL] Plpgsql function syntax error at first coalesce statement

2010-04-25 Thread Jeff Ross
Hi all, I'm trying to write my first plpgsql function and I'm running into a problem that may or may not have to do with a coalesce statement. I wrote a very similar sql function that does basically the same thing for just one trainer where I pass in an id number and that one works fine. I

[GENERAL] ALTER Bigserial error

2010-04-25 Thread Little, Douglas
Hi, I'm trying to alter in a bigserial on GP/PG 8.1 I'm getting the error ERROR: type "bigserial" does not exist SQL state: 42704 I understand that bigserial isn't a 'true' type, that it's a notational convenience. And that I can alter in the default. But it is listed in the type table in the

[GENERAL] Problem saving emails to database.

2010-04-25 Thread Andre Lopes
Hi, It is the first time that I store emails in a database to send them later... Let me explain the problem... I'am sending text emails, and to break the lines of the message I use "\n". The first problem was to stores the "\". To INSERT "\n" I need to write "\\n". When I do a SELECT I see "\n" b

[GENERAL] R: Catch exception from plpy

2010-04-25 Thread dario....@libero.it
Hi Martin, Thanks for your help ...But I still don' get it! I edited your code to correct what I think are some typos but I still get the error message. What am I doing wrong!? Dario -- create or replace function test_tryex() returns void AS $$ try: plpy.execute('create table tmp_foo (v1 i

Re: [GENERAL] User with GRANTS only on Views. Lock table on function will work?

2010-04-25 Thread Raymond O'Donnell
On 25/04/2010 13:24, Andre Lopes wrote: > Hi, > > I have a database were the users only can do operations using views, > they have not access to physical tables. But I have a function with a > lock on a physical table. Can I allow this users to run a function that > locks a physical table? You ca

[GENERAL] debug pgpool

2010-04-25 Thread Megha
Hi I am using DBT-2 database and I use pgpoolII 2.1 with that. I have modified the function pool_process_query.c in pgpoolII2.1. and I link pgpoolII2.1 with dbt2. for some reason the modified functionality doesnt work. I tried to debug pgpoolII2.1 using gdb. I set the beakpoint at pool_process_q

[GENERAL] User with GRANTS only on Views. Lock table on function will work?

2010-04-25 Thread Andre Lopes
Hi, I have a database were the users only can do operations using views, they have not access to physical tables. But I have a function with a lock on a physical table. Can I allow this users to run a function that locks a physical table? Best Regards,

Re: [GENERAL] UPDATE02Unable to run createlang (or psql for that matter)

2010-04-25 Thread John Gage
Question withdrawn. Answered via documentation. On Apr 25, 2010, at 11:08 AM, John Gage wrote: If I open a bash terminal and type createlang -l, I get: JohnGage:~ johngage$ createlang -l -bash: createlang: command not found JohnGage:~ johngage$ psql -bash: psql: command not found as one can

Re: [GENERAL] UPDATE01: Unable to run createlang (or psql for that matter)

2010-04-25 Thread John Gage
I have made some progress by looking at the documentation and at how Mac OSX sets up privileges. If I su to root and then su to postgres, I can access createlang and psql (although my user $PATH seems to be inoperative). What I can't do is su from me as user (not root) to postgres. I get

Re: [GENERAL] Invalid objects

2010-04-25 Thread Oliver Kohll - Mailing Lists
On 25 Apr 2010, at 07:34, Scott Bailey wrote: > >> I can point you to the relevant code in GitHub if you're interested (it's >> Java). > > Absolutely. Thanks > > Scott Bailey Line 813 of http://github.com/okohll/agileBase/blob/master/gtpb_server/src/com/gtwm/pb/model/manageSchema/DatabaseDefn

[GENERAL] Unable to run createlang (or psql for that matter)

2010-04-25 Thread John Gage
If I open a bash terminal and type createlang -l, I get: JohnGage:~ johngage$ createlang -l -bash: createlang: command not found JohnGage:~ johngage$ psql -bash: psql: command not found as one can see, the same thing happens with psql. The way I have been using psql is by pulling down the plugi

Re: [GENERAL] Footnote: ISP provider with postgres and perl dbi

2010-04-25 Thread John Gage
After carefully examining what was out there, decided again to go with hub.org. Thanks again John On Apr 24, 2010, at 5:55 PM, Steve Atkins wrote: If an ISP is offering virtual private servers (where you get full access to your own virtual machine) then installing postgresql and perl on