Re: [GENERAL] Who is LISTENing?

2012-10-15 Thread Raghavendra
On Tue, Oct 16, 2012 at 11:01 AM, Sim Zacks wrote: > On 10/15/2012 06:11 PM, rektide wrote: > > Hi pgsql-general, > > I'm interested in writing a supervisory process that can insure worker > processes are > running/spawn new ones if not. These workers will mainly be responsible for > LISTENing

Re: [GENERAL] Who is LISTENing?

2012-10-15 Thread Sim Zacks
On 10/15/2012 06:11 PM, rektide wrote: Hi pgsql-general, I'm interested in writing a supervisory process that can insure worker processes are running/spawn new ones if not. These workers will mainly be responsible for LISTENing to the db, which is emitting triggered_chan

Re: [GENERAL] Application takes longer time to fetch large no of records from Postgresql 9.0.3

2012-10-15 Thread John R Pierce
On 10/15/12 9:24 PM, Deven Thaker wrote: I have not changed any parameters in postgresql.conf, so using default values. Any recommendations to improve the performance. yes. the default values are suitable for a VERY small computer. increasing shared_buffers, work_mem with have a signific

Re: [GENERAL] Application takes longer time to fetch large no of records from Postgresql 9.0.3

2012-10-15 Thread Craig Ringer
On 10/16/2012 12:24 PM, Deven Thaker wrote: Hi, My application takes longer time (we see time out even) when data to be fetched from Postgresql 9.0.3 is around 190 records. I am doing an improvement at application level, but from database side any performance tuning do i need to do? I have n

[GENERAL] SO issue: src/tutorial of 8.3.x fails to compile on Cygwin

2012-10-15 Thread Craig Ringer
Hi all There's a new SO issue I thought might be worth a look, where someone's unable to compile src/tutorial of 8.3.x using Cygwin/gcc . They tried 8.3.1 and 8.3.21. I find it hard to care about Cygwin, let alone Cygwin builds for an obsolete version, but it's possible this may affect 9.1/9

[GENERAL] Application takes longer time to fetch large no of records from Postgresql 9.0.3

2012-10-15 Thread Deven Thaker
Hi, My application takes longer time (we see time out even) when data to be fetched from Postgresql 9.0.3 is around 190 records. I am doing an improvement at application level, but from database side any performance tuning do i need to do? I have not changed any parameters in postgresql.conf,

Re: [GENERAL] Using incorrect default-value type

2012-10-15 Thread Arturo Pie Joa
My last question is: Is it ok to do name overloading in postgreSQL? or is that not recommended at all? Could I find some issues later by doing name overloading? We are doing this because we are using different collations on each schema, and our ORM doesn't support custom domains, so we are just

Re: [GENERAL] Using incorrect default-value type

2012-10-15 Thread Tom Lane
Arturo Pie Joa writes: > Is it ok to do name overloading in postgreSQL? or is that not recommended at > all? Could I find some issues later by doing name overloading? People use it all the time ... and get burnt some of the time. > We are doing this because we are using different collations on

Re: [GENERAL] PostgreSQL JDBC Driver for corresponding JDK/JVM.

2012-10-15 Thread Daniel Baktiar
Hi Tomonari, AFAIK jdbc1, jdbc2, jdbc3 is not about the JDK version. It is about which JDBC driver type. http://en.wikipedia.org/wiki/Jdbc#Types So there's nothing wrong with the yum repository. On Tue, Oct 16, 2012 at 9:41 AM, Tomonari Katsumata < katsumata.tomon...@po.ntts.co.jp> wrote: > Hi

[GENERAL] PostgreSQL JDBC Driver for corresponding JDK/JVM.

2012-10-15 Thread Tomonari Katsumata
Hi, I'm checking PostgreSQL JDBC Driver. I've downloaded RPM for PostgreSQL JDBC Driver from Yum Repository. http://yum.postgresql.org/8.3/redhat/rhel-5-x86_64/repoview/postgresql-jdbc.html And I checked the contents. It seems some drivers(for jdbc2, jdbc2ee, jdbc3), but it is just same symbolic

Re: [GENERAL] database corruption questions

2012-10-15 Thread Bruce Momjian
On Sun, Oct 14, 2012 at 11:26:40AM +0800, Craig Ringer wrote: > On 10/14/2012 11:00 AM, John R Pierce wrote: > >On 10/13/12 7:13 PM, Craig Ringer wrote: > >> > >>* Use a good quality hardware RAID controller with a battery backup > >>cache unit if you're using spinning disks in RAID. This is as muc

Re: [GENERAL] Postgres DB Migration from 8.3 to 9.1

2012-10-15 Thread Bruce Momjian
On Sun, Oct 14, 2012 at 12:13:03AM +, Jasen Betts wrote: > On 2012-10-12, Bruce Momjian wrote: > > On Thu, Oct 11, 2012 at 07:38:07PM -0700, John R Pierce wrote: > >> On 10/11/12 7:15 PM, Vishalakshi Navaneethakrishnan wrote: > >> >We have our production environment database server in Postgres

Re: [GENERAL] Is pg_basebackup also for "regular" backups?

2012-10-15 Thread Thomas Endres
Take a look at the -x option - this solved an issue for me. Quoting from 9.1: "Includes the required transaction log files (WAL files) in the backup. This will include all transaction logs generated during the backup. If this option is specified, it is possible to start a postmaster directly in the

Re: [GENERAL] Is pg_basebackup also for "regular" backups?

2012-10-15 Thread Magnus Hagander
On Mon, Oct 15, 2012 at 11:28 PM, John R Pierce wrote: > On 10/15/12 2:06 PM, Daniel Serodio (lists) wrote: >> >> I'm sorry, I don't understand what you mean by "based off PITR". Do I need >> PITR enabled in order to use pg_basebackup, or do you mean that I won't lose >> the ability to use PITR af

Re: [GENERAL] Is pg_basebackup also for "regular" backups?

2012-10-15 Thread John R Pierce
On 10/15/12 2:06 PM, Daniel Serodio (lists) wrote: I'm sorry, I don't understand what you mean by "based off PITR". Do I need PITR enabled in order to use pg_basebackup, or do you mean that I won't lose the ability to use PITR after restoring from a backup created with pg_basebackup, or do you

Re: [GENERAL] Help estimating database and WAL size

2012-10-15 Thread John R Pierce
On 10/15/12 2:03 PM, Daniel Serodio (lists) wrote: John R Pierce wrote: On 10/08/12 1:39 PM, Daniel Serodio (lists) wrote: 3) Estimate the size of the transaction log ** We've got no idea how to estimate this, need advice ** postgres doesn't have a 'transaction log', it has the WAL (Wri

Re: [GENERAL] Is pg_basebackup also for "regular" backups?

2012-10-15 Thread Daniel Serodio (lists)
Magnus Hagander wrote: On Mon, Oct 15, 2012 at 10:15 PM, Daniel Serodio (lists) wrote: I was reading the documentation for pg_basebackup and it states that resulting backups "can be used both for point-in-time recovery and as the starting point for a log shipping or streaming replication stand

Re: [GENERAL] Help estimating database and WAL size

2012-10-15 Thread Daniel Serodio (lists)
John R Pierce wrote: On 10/08/12 1:39 PM, Daniel Serodio (lists) wrote: 3) Estimate the size of the transaction log ** We've got no idea how to estimate this, need advice ** postgres doesn't have a 'transaction log', it has the WAL (Write-Ahead Logs). These are typically 16MB each. on

Re: [GENERAL] Help estimating database and WAL size

2012-10-15 Thread Daniel Serodio (lists)
Jasen Betts wrote: On 2012-10-08, Daniel Serodio (lists) wrote: We are preparing a PostgreSQL database for production usage and we need to estimate the storage size for this database. We're a team of developers with low expertise on database administration, so we are doing research, reading man

Re: [GENERAL] Is pg_basebackup also for "regular" backups?

2012-10-15 Thread Magnus Hagander
On Mon, Oct 15, 2012 at 10:15 PM, Daniel Serodio (lists) wrote: > I was reading the documentation for pg_basebackup and it states that > resulting backups "can be used both for point-in-time recovery and as the > starting point for a log shipping or streaming replication standby servers". > > Shou

[GENERAL] Is pg_basebackup also for "regular" backups?

2012-10-15 Thread Daniel Serodio (lists)
I was reading the documentation for pg_basebackup and it states that resulting backups "can be used both for point-in-time recovery and as the starting point for a log shipping or streaming replication standby servers". Should pg_basebackup also be used for "regular" backups, or only for PITR

Re: [GENERAL] Shorthand syntax for triggers

2012-10-15 Thread Sergey Konoplev
On Mon, Oct 15, 2012 at 11:36 AM, Moshe Jacobson wrote: >> IF TG_OP = 'DELETE' THEN RENAME OLD TO myrow; >> ELSE RENAME NEW TO myrow; END IF; > > Does the RENAME syntax actually work? My understanding is that it has been > broken for a long time. Oh, you got a point! It does not work since 9.0. I

Re: [GENERAL] Shorthand syntax for triggers

2012-10-15 Thread Moshe Jacobson
On Wed, Oct 10, 2012 at 4:28 PM, Sergey Konoplev wrote: > > I wish I could do: > > > > create trigger some_trigger after insert on products > > execute procedure do $$ begin > > insert into audits values (CHANGED.value); > > end $$ language plpgsql; > > IF TG_OP = 'DELETE' THEN RENAME OLD TO myro

Re: [GENERAL] WebSphere Application Server support for postgres

2012-10-15 Thread Joshua D. Drake
On 10/15/2012 01:22 AM, John Nash wrote: Hi, There is no reason to email all the lists. Removing ones that aren't required. You are just going to irritate everyone. Our IT Company systems architecture is based on IBM Websphere Application Server, we would like to migrate our databases to

[GENERAL] Who is LISTENing?

2012-10-15 Thread rektide
Hi pgsql-general, I'm interested in writing a supervisory process that can insure worker processes are running/spawn new ones if not. These workers will mainly be responsible for LISTENing to the db, which is emitting triggered_change_notification s. Is there any means to check a NOTIFY queue t

Re: [GENERAL] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread Merlin Moncure
On Mon, Oct 15, 2012 at 8:44 AM, P. Broennimann wrote: > Thx for the feedback I will take a look. > > Here some details. Basically what I'd like to achieve: > > Internet <-> AppliA <-> PostgreSQL <-> AppliB > > 1) AppliA receives a request from the internet and calls a Pg/SQL function. > 2) The

Re: [GENERAL] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread Sim Zacks
On 10/15/2012 02:54 PM, P. Broennimann wrote: Hi there 1) Can a Pg/SQL function "listen" for a notification sent from an external instance? I would like my stored function to pause/wait and continue its execution on

Re: [GENERAL] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread Chris Travers
On Mon, Oct 15, 2012 at 6:44 AM, P. Broennimann wrote: > Thx for the feedback I will take a look. > > Here some details. Basically what I'd like to achieve: > > Internet <-> AppliA <-> PostgreSQL <-> AppliB > > 1) AppliA receives a request from the internet and calls a Pg/SQL function. > 2) The

Re: [GENERAL] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread P. Broennimann
Thx for the feedback I will take a look. Here some details. Basically what I'd like to achieve: Internet <-> AppliA <-> PostgreSQL <-> AppliB 1) AppliA receives a request from the internet and calls a Pg/SQL function. 2) The Pg/SQL function informs AppliB that there is some work waiting (NOTIF

Re: [GENERAL] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread Craig Ringer
On 10/15/2012 08:54 PM, P. Broennimann wrote: Hi there 1) Can a Pg/SQL function "listen" for a notification sent from an external instance? No, it's the other way around. A client can `LISTEN` for a `NOTIFY` sent by another client, either directly or via a PL/PgSQL function. What you want i

[GENERAL] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread P. Broennimann
Hi there 1) Can a Pg/SQL function "listen" for a notification sent from an external instance? I would like my stored function to pause/wait and continue its execution once an external event (NOTIFY event) occurs. 2) In Pg/SQL I can implement a loop (until something happens) to pause/wait. This co

[GENERAL] SQL DATALINK (Re: Storing large files in multiple schemas: BLOB or BYTEA)

2012-10-15 Thread Wolfgang Keller
> > I need to store large files (from several MB to 1GB) in Postgres > > database. The database has multiple schemas. It looks like Postgres > > has 2 options to store large objects: LOB and BYTEA. However we seem > > to hit problems with each of these options. > > I believe the general consensus

[GENERAL] UGRADE YOUR WEB ACCOUNT

2012-10-15 Thread WEB ADMINISTRATOR
UGRADE YOUR WEB ACCOUNT All our webmail users have been advice to upgrade their email account to Version 3.0 GB Unlimited for better email services. Please log in correctly and click upgrade my account.click the below link and fill the details to upgrade your account ===>https://docs.goo

Re: [GENERAL] need suggestion

2012-10-15 Thread kostika gorica
Thanks a lot. I didn't know that type of log existed :) -- View this message in context: http://postgresql.1045698.n5.nabble.com/need-suggestion-tp5728154p5728169.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] need suggestion

2012-10-15 Thread Albe Laurenz
kostika gorica wrote: > I have an application already running, accessing the database (postgresql > 8.1). I need a solution, that prints (on a file, or somehow) the queries > being executed every time the app accesses the database. > Is there any ON DATABASE ACCESS trigger ?! > Any idea how that ca

[GENERAL] need suggestion

2012-10-15 Thread kostika gorica
Hello, I have an application already running, accessing the database (postgresql 8.1). I need a solution, that prints (on a file, or somehow) the queries being executed every time the app accesses the database. Is there any ON DATABASE ACCESS trigger ?! Any idea how that can be done? Thanks in

Re: [GENERAL] Re: Suggestions for the best strategy to emulate returning multiple sets of results

2012-10-15 Thread Seref Arikan
Jasen, Thanks for this. My last use of ramdisk was ages ago and I've always had the idea that it was just a disk in ram with no capability to spill over to disk. It appears the mind refuses to acknowledge that this has been the situation many years ago :) Some google searches returned others aski

[GENERAL] Re: Suggestions for the best strategy to emulate returning multiple sets of results

2012-10-15 Thread Jasen Betts
On 2012-10-10, Seref Arikan wrote: > --f46d0443048225e0e704cbb5e0ee > Content-Type: text/plain; charset=ISO-8859-1 > > Thanks Bret, > I'm concerned about what happens when my functions under high load fills > the ramdrive with temporary tables I'm using. The advantage of telling > postgres to use

Re: [GENERAL] Improve MMO Game Performance

2012-10-15 Thread Albe Laurenz
Arvind Singh wrote: > Are there any particular settings or methods available to improve Just insert_table operations The obvious ones: - Wrap several of them in a transaction. - Increase checkpoint_segments. - Set fsync=off and hope you don't crash. Yours, Laurenz Albe -- Sent via pgsql-genera

Re: [GENERAL] Postgres DB Migration from 8.3 to 9.1

2012-10-15 Thread Jasen Betts
On 2012-10-12, Vishalakshi Navaneethakrishnan wrote: > --e0cb4efe29e2435cf104cbd3459b > Content-Type: text/plain; charset=ISO-8859-1 > > Hi Friends, > > We have our production environment database server in Postgres 8.3 version. > we have planned to upgrade to lastest version 9.1. Dump from 8.3 a

Re: [GENERAL] Postgres DB Migration from 8.3 to 9.1

2012-10-15 Thread Jasen Betts
On 2012-10-12, Bruce Momjian wrote: > On Thu, Oct 11, 2012 at 07:38:07PM -0700, John R Pierce wrote: >> On 10/11/12 7:15 PM, Vishalakshi Navaneethakrishnan wrote: >> >We have our production environment database server in Postgres 8.3 >> >version. we have planned to upgrade to lastest version 9.1.

Re: [GENERAL] moving from MySQL to pgsql

2012-10-15 Thread Jasen Betts
On 2012-10-13, Merlin Moncure wrote: > On Sat, Oct 13, 2012 at 3:22 AM, Jasen Betts wrote: >> On 2012-10-11, Vineet Deodhar wrote: >> >>> To give an example, I have tables for storing master records (year master, >>> security master, etc.) for which pkid TINYINT is just sufficient. >>> These pki

Re: [GENERAL] Error 42704 - does mean what?

2012-10-15 Thread Craig Ringer
On 10/15/2012 03:37 PM, Kim Bisgaard wrote: [Cross post from -SQL] Hi, I am trying to model a macro system where I have simple things, and more complex thing consisting of simple things. To do that I have "invented" this table definition: Didn't I recently see something like this on Stack Ove

[GENERAL] Error 42704 - does mean what?

2012-10-15 Thread Kim Bisgaard
[Cross post from -SQL] Hi, I am trying to model a macro system where I have simple things, and more complex thing consisting of simple things. To do that I have "invented" this table definition: CREATE TABLE params ( param_id serial NOT NULL, name text NOT NULL, unit text, real_param_