Re: [GENERAL] Postgres physical directory structure meaning

2010-02-15 Thread A. Kretschmer
In response to S Arvind : > I want to know about the meaning of various directory present in data folder. > Mostly what will the 'base' folder contains? The reason of this is recently in > the datafolder 'global' was deleted unknowingly which leads to entire DB crash > in a second. We found a tool

[GENERAL] Postgres physical directory structure meaning

2010-02-15 Thread S Arvind
I want to know about the meaning of various directory present in data folder. Mostly what will the 'base' folder contains? The reason of this is recently in the datafolder 'global' was deleted unknowingly which leads to entire DB crash in a second. We found a tool to get the data from the base fold

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-15 Thread Tom Lane
John DeSoi writes: > On Feb 15, 2010, at 1:23 PM, Andre Lopes wrote: >> I have contacted again the support center on a2hosting.com and the answer >> was that is no manual creation of triggers on PostgreSQL, bu the guy have >> send to me a link with MySQL information about the >> subject,https:/

Re: [GENERAL] CLUSTER cannot complete

2010-02-15 Thread Greg Smith
Vick Khera wrote: On Mon, Feb 15, 2010 at 9:54 AM, Marcin Krol wrote: I didn't add or delete many rows from that table. Quite a lot of UPDATEs are running daily, though. Every update is equal to insert + delete, except in certain circumstances in 8.3 and above. Well, it's still a

[GENERAL] Having a plpgsql function return multiple rows that indicate its progress in a cursor like fashion

2010-02-15 Thread Peter Geoghegan
Hello, At the moment my pg client application (running 8.4) transfers data from several remote DBs (that run 8.3) via dblink, using cursors where appropriate, and reporting back progress to users using a progress bar and brief messages. I thought it would be great to change my code to have all th

Re: [GENERAL] pg_hba.conf - Allow All Connections Over TCP/IP Networks

2010-02-15 Thread John R Pierce
Wang, Mary Y wrote: Hi, I'd like to allow all connections over TCP/IP networks. So could I just add the following line to the pg_hba.conf in the $PGDATA directory? "host all * trust" The database server is located inside a firewall. host all all 0.0.0.0/0 trust or

[GENERAL] pg_hba.conf - Allow All Connections Over TCP/IP Networks

2010-02-15 Thread Wang, Mary Y
Hi, I'd like to allow all connections over TCP/IP networks. So could I just add the following line to the pg_hba.conf in the $PGDATA directory? "host all * trust" The database server is located inside a firewall. Thanks Mary -- Sent via pgsql-general mailing list (pgsql-genera

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-15 Thread John DeSoi
On Feb 15, 2010, at 1:23 PM, Andre Lopes wrote: > I have contacted again the support center on a2hosting.com and the answer was > that is no manual creation of triggers on PostgreSQL, bu the guy have send to > me a link with MySQL information about the > subject,https://support.a2hosting.com/i

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-15 Thread Scott Marlowe
On Mon, Feb 15, 2010 at 12:25 PM, John R Pierce wrote: > Andre Lopes wrote: >> >> It is secure for non experts to have VPS for hosting webapplications? > > frankly, its not secure to have non-experts posting PHP, never mind anything > else. Just remove the PHP and you're closer to the truth there

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-15 Thread John R Pierce
Andre Lopes wrote: It is secure for non experts to have VPS for hosting webapplications? frankly, its not secure to have non-experts posting PHP, never mind anything else. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://w

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-15 Thread Scott Marlowe
On Mon, Feb 15, 2010 at 9:25 AM, Andre Lopes wrote: > A2hosting.com supports Triggers, but in the WebHosting Plan and in the > Reseller Plan the Triggers creation is not done by the user, we must send > the Trigger to the support center and then they compile the Trigger... > > A2hosting have also

Re: [GENERAL] CLUSTER cannot complete

2010-02-15 Thread Vick Khera
On Mon, Feb 15, 2010 at 9:54 AM, Marcin Krol wrote: > I didn't add or delete many rows from that table. Quite a lot of UPDATEs are > running daily, though. Every update is equal to insert + delete, except in certain circumstances in 8.3 and above. -- Sent via pgsql-general mailing list (pgsql-g

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-15 Thread Allan Kamau
On Mon, Feb 15, 2010 at 9:23 PM, Andre Lopes wrote: > I have contacted again the support center on a2hosting.com and the answer > was that is no manual creation of triggers on PostgreSQL, bu the guy have > send to me a link with MySQL information about the subject, > https://support.a2hosting.com/

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-15 Thread Andre Lopes
I have contacted again the support center on a2hosting.com and the answer was that is no manual creation of triggers on PostgreSQL, bu the guy have send to me a link with MySQL information about the subject, https://support.a2hosting.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=500 Th

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-15 Thread Andre Lopes
Hi, I have talk with the support. Here is the conversation: [quote] Matt T. - A2 Hosting Support: Hello, how may I help you today? André Lopes: I need to know if a2hosting allows Trigger creation in PostgreSQL databases Matt T. - A2 Hosting Support: Yes but our admins would need to create them fo

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-15 Thread John DeSoi
On Feb 15, 2010, at 11:25 AM, Andre Lopes wrote: > A2hosting.com supports Triggers, but in the WebHosting Plan and in the > Reseller Plan the Triggers creation is not done by the user, we must send the > Trigger to the support center and then they compile the Trigger... Where did you hear thi

Re: [GENERAL] Multiple Server Installation/Design Question.

2010-02-15 Thread Scott Marlowe
On Mon, Feb 15, 2010 at 9:01 AM, Ozz Nixon wrote: > Hello, > >        I have been experimenting with the product, nicely done! I would like > to implement it in a live scenario now, however, I have questions. > > I have 2 Data Centers, 1 with 2 ISPs and 1 with 1 ISP. I would like to setup > the pr

Re: [GENERAL] CLUSTER on 2 indexes ?

2010-02-15 Thread Scott Marlowe
On Mon, Feb 15, 2010 at 9:47 AM, Joao Ferreira gmail wrote: > Hello, > > Considering the CLUSTER operation on a frequently updated table, if I > have 2 indexes on the table how do I choose one of them ? or is it > possible to have CLUSTER take both into consideration... You could have a multi-col

[GENERAL] CLUSTER on 2 indexes ?

2010-02-15 Thread Joao Ferreira gmail
Hello, Considering the CLUSTER operation on a frequently updated table, if I have 2 indexes on the table how do I choose one of them ? or is it possible to have CLUSTER take both into consideration... my table is read from based on two columns: a 'timestamp' integer column (actually a UTC integer

Re: [GENERAL] Hosting Account with PostgreSQL and PHP?

2010-02-15 Thread Andre Lopes
A2hosting.com supports Triggers, but in the WebHosting Plan and in the Reseller Plan the Triggers creation is not done by the user, we must send the Trigger to the support center and then they compile the Trigger... A2hosting have also VPS Hosting, but I'am not a total expert in Linux... and it is

[GENERAL] Multiple Server Installation/Design Question.

2010-02-15 Thread Ozz Nixon
Hello, I have been experimenting with the product, nicely done! I would like to implement it in a live scenario now, however, I have questions. I have 2 Data Centers, 1 with 2 ISPs and 1 with 1 ISP. I would like to setup the product to replicate from 1 center to another - as close to rea

Re: [GENERAL] Selection of index for CLUSTER

2010-02-15 Thread Leonardo F
> The docs are mute on this. Not true. Read the NOTES section of http://www.postgresql.org/docs/8.4/static/sql-cluster.html : -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] vacuum analyze GROWS db ?!

2010-02-15 Thread hubert depesz lubaczewski
On Mon, Feb 15, 2010 at 05:04:14PM +0100, Marcin Krol wrote: > Tom Lane wrote: >> Do you *know* that relpages was up to date before that? If your system >> only does manual vacuums then those numbers probably reflected reality >> as of your last vacuum. There are functions that will give you true

Re: [GENERAL] vacuum analyze GROWS db ?!

2010-02-15 Thread Marcin Krol
Tom Lane wrote: Do you *know* that relpages was up to date before that? If your system only does manual vacuums then those numbers probably reflected reality as of your last vacuum. There are functions that will give you true file sizes but relpages ain't it. Oh great. Another catch. What are

Re: [GENERAL] vacuum analyze GROWS db ?!

2010-02-15 Thread Tom Lane
Marcin Krol writes: > The app that created this db is written by me for a change. But I've > done simple VACUUM ANALYZE on the biggest table in db and got this: Do you *know* that relpages was up to date before that? If your system only does manual vacuums then those numbers probably reflected

[GENERAL] Selection of index for CLUSTER

2010-02-15 Thread Marcin Krol
Hello everyone, Is there some guideline for selection of index to use for CLUSTER? This is rather important as physical table is reorganized according to that index I gather? The docs are mute on this. The docs recommend running ANALYZE on the table. hrs=# ANALYZE VERBOSE hosts; INFO: analy

[GENERAL] CLUSTER cannot complete

2010-02-15 Thread Marcin Krol
Hello everyone, Resolved, I've done: hrs=# CLUSTER hosts_ip_idx ON hosts; CLUSTER hrs=# hrs=# hrs=# SELECT relpages * 8192 AS size_in_bytes, relname FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'public') ORDER BY size_in_bytes DESC LIMIT 10; size_in_bytes

Re: [GENERAL] Set the permissions while creating database, schema, and tables

2010-02-15 Thread Alvaro Herrera
dipti shah escribió: > That's I know but I was wondering if there is anyway to do it while creating > itself. No. You can wrap the CREATE and the GRANT/REVOKE into a transaction so that the object doesn't appear to users until permissions have been fixed. -- Alvaro Herrera

[GENERAL] CLUSTER cannot complete

2010-02-15 Thread Marcin Krol
Hello everyone, I got this, first CLUSTER was hanging forever, I cancelled after half an hour: hrs=# CLUSTER hosts; Cancel request sent ERROR: canceling statement due to user request Then I restarted postgres and get this now: hrs=# CLUSTER hosts; ERROR: there is no previously clustered

[GENERAL] vacuum analyze GROWS db ?!

2010-02-15 Thread Marcin Krol
Hello everyone, The app that created this db is written by me for a change. But I've done simple VACUUM ANALYZE on the biggest table in db and got this: before VACUUM ANALYZE: hrs=# SELECT relpages * 8192 AS size_in_bytes, relname FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_names

Re: [GENERAL] how to create a new composite type using already existing composite types

2010-02-15 Thread Merlin Moncure
On Sat, Feb 13, 2010 at 7:24 PM, Jeff Davis wrote: > On Wed, 2010-02-10 at 03:46 +, Iain Barnett wrote: > >> CREATE TYPE inventory_item2 AS ( >>     name            text, >>     supplier_id     integer, >>     price           numeric, >> size  integer >> ); >> >> >> but it would be handy if I

Re: [GENERAL] Set the permissions while creating database, schema, and tables

2010-02-15 Thread dipti shah
That's I know but I was wondering if there is anyway to do it while creating itself. On Mon, Feb 15, 2010 at 1:46 PM, John R Pierce wrote: > dipti shah wrote: > >> Hi, >> >> Could anyone please help me out here. I want to set the required >> permissions while creating PostGreSQL database, schem

Re: [GENERAL] Set the permissions while creating database, schema, and tables

2010-02-15 Thread John R Pierce
dipti shah wrote: Hi, Could anyone please help me out here. I want to set the required permissions while creating PostGreSQL database, schema, and tables from stored procedures. Is it possible to do it while creating them? I could see that "OWNER" option is there while creating database but

[GENERAL] Set the permissions while creating database, schema, and tables

2010-02-15 Thread dipti shah
Hi, Could anyone please help me out here. I want to set the required permissions while creating PostGreSQL database, schema, and tables from stored procedures. Is it possible to do it while creating them? I could see that "OWNER" option is there while creating database but couldn't see such optio