Re: [ADMIN] cannot restore a view after a dump

2008-04-08 Thread Marc Cousin
Hi, Sorry to post again, but I feel this issue is a bit strange and I'd like to understand it. The problem is that I've got the same query that runs sometimes, and fails with a syntax error at other times... It's the first time I've seen it, and I've been using PostgreSQL for a while now ... T

Re: [ADMIN] Tuning

2008-04-08 Thread Michael Monnerie
On Montag, 7. April 2008 Scott Marlowe wrote: > You can monitor things like index and table bloat with the pg_stat_* > series of views. Are there scripts to automate this look at stats? Or could one draw graphs from that values, to visualize how well the db is? E.g., if you could calculate a % va

Re: [ADMIN] Tuning

2008-04-08 Thread paul rivers
Michael Monnerie wrote: On Montag, 7. April 2008 Scott Marlowe wrote: You can monitor things like index and table bloat with the pg_stat_* series of views. Are there scripts to automate this look at stats? Or could one draw graphs from that values, to visualize how well the db is? E.g

Re: [ADMIN] Tuning

2008-04-08 Thread Jeff Frost
> Are there scripts to automate this look at stats? > Or could one draw graphs from that values, to visualize how well the db > is? E.g., if you could calculate a % value, you could make RRD stats to > see it's change over time. Is there any project on this? I don't know about rrd graphing it,

Re: [ADMIN] Tuning

2008-04-08 Thread Michael Monnerie
On Dienstag, 8. April 2008 paul rivers wrote: > I don't see a direct way to monitor bloat from pg_stat*.   If I'm > wrong, please set me straight. > > For example, monitoring index bloat would involve deciding how many > pages an index would ideally consume, based on either sampling the > table you

Re: [ADMIN] Handling large volumes of data

2008-04-08 Thread Tino Schwarze
On Tue, Apr 08, 2008 at 11:42:34AM +0200, Johann Spies wrote: > 12501 ?S 0:00 /usr/lib/postgresql/8.1/bin/postmaster -D > /var/lib/postgresql/8.1/main -c > config_file=/etc/postgresql/8.1/main/postgresql.conf > 12504 ?D 0:54 \_ postgres: writer process > 12505 ?

Re: [ADMIN] Handling large volumes of data

2008-04-08 Thread Johann Spies
On Tue, Apr 08, 2008 at 12:01:14PM +0200, Michael Monnerie wrote: > On Dienstag, 8. April 2008 Johann Spies wrote: > > This took about a week on a 2xCPU quadcore server with 8Gb RAM. > > This is not the most interesting thing here. What disk I/O subsystem do > you use? At least a hardware RAID co

[ADMIN] Hiding PG/SQL functions

2008-04-08 Thread biggero
Hi, I have PG/SQL functions in Postgres database created using sequence of following statements: (example) CREATE OR REPLACE FUNCTION get_data RETURNS integer AS $$ ... $$ LANGUAGE plpgsql; These PG/SQL functions can be viewed using pgAdmin. I don't like this because users can see the interna

Re: [ADMIN] Handling large volumes of data

2008-04-08 Thread Michael Monnerie
On Dienstag, 8. April 2008 Johann Spies wrote: > This took about a week on a 2xCPU quadcore server with 8Gb RAM. This is not the most interesting thing here. What disk I/O subsystem do you use? At least a hardware RAID controller with RAID 0 or 10 should be used, with 10krpm or 15krpm drives. SA

[ADMIN] Handling large volumes of data

2008-04-08 Thread Johann Spies
I want to set up a system where logs of all kinds can be put in tables so that queries and reports can be generated from there. Our Firewall logs alone generate about 600,000,000 lines per month and that will increase as we get more bandwidth. I am testing postgresql's ability to handle large dat

Re: [ADMIN] Handling large volumes of data

2008-04-08 Thread Shoaib Mir
On Tue, Apr 8, 2008 at 7:42 PM, Johann Spies <[EMAIL PROTECTED]> wrote: > Apparently the best approach is not to have very large tables. I am > thinking of making (as far as the firewall is concerned) a different > table for each day and then drop the older tables as necessary. > > Any advice on

Re: [ADMIN] Handling large volumes of data

2008-04-08 Thread Tino Schwarze
On Tue, Apr 08, 2008 at 12:13:36PM +0200, Johann Spies wrote: > > > This took about a week on a 2xCPU quadcore server with 8Gb RAM. > > > > This is not the most interesting thing here. What disk I/O subsystem do > > you use? At least a hardware RAID controller with RAID 0 or 10 should > > be us

Re: [ADMIN] Handling large volumes of data

2008-04-08 Thread Johann Spies
On Tue, Apr 08, 2008 at 11:55:00AM +0200, Tino Schwarze wrote: > The drop table will wait for the autovacuum to finish. You might want to > kill the autovacuum process (this doesn't do any harm, just aborts the > operation so the drop table may proceed). Thanks. That is good to know. Regards Joh

Re: [ADMIN] cannot restore a view after a dump

2008-04-08 Thread Marc Cousin
I didn't put it in, pg_dump dit it for me... it seems that when a view has a distinct, the dumped view has automatically the order by. that's what triggered the whole problem. But the query is supposed to be the same with the order by, because of the distinct, so pg_dump is not wrong. It looks

Re: [ADMIN] cannot restore a view after a dump

2008-04-08 Thread Tom Lane
Marc Cousin <[EMAIL PROTECTED]> writes: > Sorry to post again, but I feel this issue is a bit strange and I'd like to > understand it. The problem is that I've got the same query that runs > sometimes, and fails with a syntax error at other times... It's the first > time I've seen it, and I've b

Re: [ADMIN] Hiding PG/SQL functions

2008-04-08 Thread Andrew Sullivan
On Tue, Apr 08, 2008 at 12:25:03PM +0200, [EMAIL PROTECTED] wrote: > > My questions are: > 1. How can you hide PG/SQL functions from other users, so that they can't > see the functions, but they can still execute them? See the archives on this. There are some tricks suggested, but the short ans

Re: [ADMIN] Handling large volumes of data

2008-04-08 Thread Tena Sakai
Hi, > So I decided maybe it is a good thing to run 'autovacuum analyse' to > clean up things. After a few days the process is still running and > the load average still constantly about 5. > I then decided to just drop the tables. I did that about 18 hours ago > and still there is no sign of P

[ADMIN] Duplicate Key Error Message Very Vague

2008-04-08 Thread Campbell, Lance
Duplicate Key Error Message Very Vague, I got the following message when doing an update: duplicate key violates unique constraint "user_role_pkey" Is there a reason PostgreSQL could not be modified to tell us the values of the keys so we could then trouble shoot the issue? Example:

[ADMIN] CREATE LANGUAGE cannot load library ERROR!

2008-04-08 Thread yawei hou
Hi: I am rather new to PostgreSQL and so have probably done something stupid (or not done something). I am running PostgreSQL 8.2.7 on Windows 2003 serverr. When I use 'create language' to add pl/perl to a database, I get the following error: ERROR: could not load library "C:

Re: [ADMIN] Handling large volumes of data

2008-04-08 Thread Michael Monnerie
On Dienstag, 8. April 2008 Johann Spies wrote: > I have got 8x720G disks in a hardware raid 5 setup. It is a Dell 2950 > server. I am using an XFS-filesystem.  I am not certain about the > speed of the hard disk, but we bought the fastest we could get. 720G looks like SATA disks, probably with "on

[ADMIN] pg_dump/pg_restore

2008-04-08 Thread Sergio Gabriel Rodriguez
Hi for all, first sorry for my english is not good. I'm using postgresql 7.4, I have a problem with pg_dump/pg_restore. I want to back and restore only one schema from my db (I did it), but when I restore it, postgresql found errors in some views, this ones needs of others which can't be found bec

Re: [ADMIN] pg_dump/pg_restore

2008-04-08 Thread Tino Schwarze
On Tue, Apr 08, 2008 at 04:52:23PM -0300, Sergio Gabriel Rodriguez wrote: > I'm using postgresql 7.4, I have a problem with pg_dump/pg_restore. I > want to back and restore only one schema from my db (I did it), but > when I restore it, postgresql found errors in some views, this ones > needs of o

Re: [ADMIN] pg_dump/pg_restore

2008-04-08 Thread Tom Lane
"Sergio Gabriel Rodriguez" <[EMAIL PROTECTED]> writes: > I'm using postgresql 7.4, I have a problem with pg_dump/pg_restore. I > want to back and restore only one schema from my db (I did it), but > when I restore it, postgresql found errors in some views, this ones > needs of others which can't be