Re: [ADMIN] [PERFORM] Find how much memory is postgres using

2013-04-07 Thread hubert depesz lubaczewski
On Sat, Apr 06, 2013 at 09:59:16PM -0700, Nik Tek wrote: > Could someone tell m how to measure postgres memory usage. > Is there a pg_* view to measure? http://www.depesz.com/2012/06/09/how-much-ram-is-postgresql-using/ Best regards, depesz -- The best thing about modern society is how easy it

Re: [ADMIN] URGENT: how to GRANT privillages to user/role on relation's row??

2008-06-18 Thread hubert depesz lubaczewski
On Wed, Jun 18, 2008 at 10:05:13AM -0700, pradeep kumar wrote: > GRANT command but how can we GRANT privillages to a user on a row ??? ? in standard postgresql you can't. if you want row-level privileges, check this: http://code.google.com/p/sepgsql/ depesz -- Sent via pgsql-admin mailing list

Re: [ADMIN] Index problem...

2008-05-22 Thread hubert depesz lubaczewski
On Thu, May 22, 2008 at 03:41:38PM -0400, Carol Walter wrote: > This gives the same error. I can select columns from the table > although select * gets the error. I tried making a copy of the > "maps" table using CREATE TABLE new table name (all columns) AS > SELECT all columns FROM maps;

Re: [ADMIN] Index problem...

2008-05-22 Thread hubert depesz lubaczewski
On Thu, May 22, 2008 at 01:37:56PM -0400, Carol Walter wrote: > When I ran the query you specified I got relname of "pg_toast_16429. > When I ran the REINDEX TABLE pg_toast_16429 the system responds that > relation "pg_toast_16429" does not exist. I think it should be pg_toast.pg_toast_16429

Re: [ADMIN] how to improve COPY timings or reduce data loading time using copy

2008-03-31 Thread hubert depesz lubaczewski
On Mon, Mar 31, 2008 at 01:26:52AM -0500, Potluri Srikanth wrote: >how can i reduce the time ? try this: http://pgbulkload.projects.postgresql.org/ depesz -- quicksil1er: "postgres is excellent, but like any DB it requires a highly paid DBA. here's my CV!" :) http://www.depesz.com/ - blog

Re: [ADMIN] off-topic - list files on linux

2008-03-29 Thread hubert depesz lubaczewski
On Fri, Mar 28, 2008 at 09:39:53AM -0300, A.Burbello wrote: > How can I get the files in a directory, but not the > last file updated/created? > I could get the last file updated with: > ls -t1p | grep -v / | grep -v backup | head -1 > How can I get the inverse list, other files without > the last

Re: [ADMIN] what is the maximum number of rows in a table in postgresql 8.1

2008-03-25 Thread hubert depesz lubaczewski
On Tue, Mar 25, 2008 at 05:42:46PM +0530, sathiya psql wrote: > i need what will be the maximum number of rows *to have good performance* in > postgres 8.1 any. just accept the fact that count(*) is *always* slow. use triggers to store counts if you are using them all of the time. also, i have t

Re: [ADMIN] Postgres Performance

2008-03-20 Thread hubert depesz lubaczewski
On Thu, Mar 20, 2008 at 04:02:48PM +0530, Aftab Alam wrote: > I have mistaken written 7.0 instead of 7.3, I am getting more than 2000 hits > daily, can u suggest the best configuration. Mean while I am trying to > migrate it to 8.3.1 7.3 is also pretty old. as for 2000 hits daily - it's not much.

Re: [ADMIN] Postgres Performance

2008-03-20 Thread hubert depesz lubaczewski
On Thu, Mar 20, 2008 at 03:12:43PM +0530, Aftab Alam wrote: > I am using postgres 7.0 with linux with 15 GB of database & 3 gb > of RAM. > Can anyone suggest what is the best setting for postgres. I am using postgres > as web db. the best setting would be to upgrade. 7.0 was released

Re: [ADMIN] how to create a limited user

2008-01-22 Thread hubert depesz lubaczewski
On Mon, Jan 21, 2008 at 03:49:55PM -0800, Guillermo Arias wrote: > Hi, i have a question: > > I have a database and i want to create a administrator user with total > control and another that only could make queries and could not see nor > modify the functions. > > The reason is that in the datab

Re: [ADMIN] how to create dir using pg/plsql

2007-08-29 Thread hubert depesz lubaczewski
On Wed, Aug 29, 2007 at 02:45:56PM +0800, [EMAIL PROTECTED] wrote: > just subject, > i need to create dir using pg/plsql function,,but cannt get anything after > google, it's not possible. pl/pgsql is trusted language (like pl/perl and pl/tcl). trusted languages cannot use system-level functions.

Re: [ADMIN] Distributed database with PostgreSQL

2007-06-28 Thread hubert depesz lubaczewski
On 6/28/07, POLONKAI Gergely <[EMAIL PROTECTED]> wrote: hubert depesz lubaczewski írta: Actually, it is not replication we need, as all the nodes are equal, so there is no master server at all. I'm googling around now with these keywords tho, but I think this is not we need... i

Re: [ADMIN] Distributed database with PostgreSQL

2007-06-28 Thread hubert depesz lubaczewski
On 6/28/07, POLONKAI Gergely <[EMAIL PROTECTED]> wrote: keywords), I ask here: is it possible to run one database on multiple servers, so all the nodes would see the same data? what you're asking is replication, and i belive that if you do a simple search on "postgresql replication" it will r

Re: [ADMIN] [SQL] create view with check option

2007-03-18 Thread hubert depesz lubaczewski
On 3/19/07, Tom Lane <[EMAIL PROTECTED]> wrote: "Karthikeyan Sundaram" <[EMAIL PROTECTED]> writes: >I am getting an error message: > ERROR: WITH CHECK OPTION is not implemented >what does this mean? It seems perfectly clear to me ... errors is clear, but maybe the information about chec

Re: [ADMIN] biginteger to timestamp

2006-07-20 Thread hubert depesz lubaczewski
On 7/20/06, LiveShell <[EMAIL PROTECTED]> wrote: Hi all, I want to convert biginteger and integer data type to timestamp data type.Can any body tell me how to convert?? and what is in this biginteger?is it something like:20060720113254::bigintor rather something like "seconds from epoch"?o

Re: [ADMIN] How are ppl monitoring PostgreSQL ... ? What is being monitored ... ?

2006-07-10 Thread hubert depesz lubaczewski
On 7/9/06, Jeff Frost <[EMAIL PROTECTED]> wrote: Do you already have a MRTG plugin for postgres that you've written and if so,care to share it with the rest of us?  Or better yet, share it with themrtg.org folks?  I was thinking of writing one, but if you have one already, I hate to reinvent the wh

Re: [ADMIN] How are ppl monitoring PostgreSQL ... ? What is being monitored ... ?

2006-07-07 Thread hubert depesz lubaczewski
On 7/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Interesting, Hubert.Where/how do you get the data for:  - number of transactions per second periodically (every 5 minutes) i do:select sum(xact_commit) + sum(xact_rollback) from pg_stat_databaseand then just check against previous value, and c

Re: [ADMIN] Is it possible to trace all transactions done?

2006-06-24 Thread hubert depesz lubaczewski
On 6/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Is Postgresql provide feature to log all the transactions/queries have beentriggered into log? sure. check you postgresl.conf file.log_statement is what you're looking for.depesz-- http://www.depesz.com/ - nowy, lepszy depesz

Re: [ADMIN] How are ppl monitoring PostgreSQL ... ? What is being monitored ... ?

2006-06-11 Thread hubert depesz lubaczewski
On 6/10/06, Marc G. Fournier <[EMAIL PROTECTED]> wrote: The subject kinda says it all ... I know there are SNMP patches availableout there now, but without those ... ?i can tell you what we do monitor:1. general server things (free disk space, cpu-idle, load, memory used, swap used, context switche

Re: [ADMIN] How to mesure transaction rate in Postgres

2006-05-24 Thread hubert depesz lubaczewski
On 5/23/06, Meyer Marco <[EMAIL PROTECTED]> wrote: I've been asked for the transaction rate we have on an installed Postgres server. Where and how can I get this information. I could not find anything in the documentation. I have root access to the system. this is definitelly not nice approa

Re: [ADMIN] Logging nested function calls...

2006-01-10 Thread hubert depesz lubaczewski
On 1/10/06, Mario Splivalo <[EMAIL PROTECTED]> wrote: The 'problem' is that, in the log file, I only see the top callingfunction, the one that client called. Is there a way to tell postgres tolog all the nested functions?smiply use:raise log '' at the beginning of your functions.will work.depes

Re: [ADMIN] pgstattuple, vacuum and free_space

2005-11-26 Thread hubert depesz lubaczewski
On 11/24/05, Colton Smith <[EMAIL PROTECTED]> wrote: My question: when you vacuum a table and generate 'free_space', who isallowed to consume this 'free_space'? Is it released to the OS forgeneral use? Or is it reserved just for the database? If the latter, isit reserved just for 'wind' (in this ca

Re: [ADMIN] freezing a particular field in a table

2005-11-23 Thread hubert depesz lubaczewski
On 11/23/05, Michael Fuhr <[EMAIL PROTECTED]> wrote:   IF NEW.some_field IS DISTINCT FROM OLD.some_field THENIS DISTINCT FROM is like <> except that it treats NULL as an ordinaryvalue. thanks - i didn't know about this operator.  > CREATE TRIGGER impossible_to_change BEFORE UPDATE ON some_table FO

Re: [ADMIN] freezing a particular field in a table

2005-11-23 Thread hubert depesz lubaczewski
On 11/23/05, Ferindo Middleton Jr <[EMAIL PROTECTED]> wrote: Is there a way where you can implement a situation in a postgres tablewhere a particular field cannot be changed when saved initially. I have CREATE OR REPLACE FUNCTION impossible_to_change() RETURNS TRIGGER AS $BODY$ DECLARE BEGIN   

Re: [ADMIN] Open connections details

2005-11-08 Thread hubert depesz lubaczewski
On 11/8/05, Andrew Watters <[EMAIL PROTECTED]> wrote: I am trying to find details about open connections. I can see that thereare open connections through Tools | Server Status in pgAdmin III. Howcan I find what the current and/or last SQL statement was that was run in those open connections please

Re: [ADMIN] Database size, and table size

2005-10-21 Thread hubert depesz lubaczewski
On 10/22/05, Roger Strandberg / Hamsta <[EMAIL PROTECTED]> wrote: I wondering about file size of a table. dont wonder :) install dbsize module from postgresql contrib, and check. depesz

Re: [ADMIN]

2005-09-14 Thread hubert depesz lubaczewski
On 9/13/05, Yossi Kachlon <[EMAIL PROTECTED]> wrote:  – Does PostgeSql support partitions and/or partition views? not yet. but usually using partial indices works as well. usually. not always.   2- I tried to install two installations of PostgreSql on windows-2000 and after the first

Re: [ADMIN]

2005-09-13 Thread hubert depesz lubaczewski
On 9/13/05, Yossi Kachlon <[EMAIL PROTECTED]> wrote: 1 - I would like to know if I can install several installations of PostgreSql on the same machine with silent install (different ports) ? of course. you can have as many installations as you want (limited by number of ports, memory

Re: [ADMIN] wal logging

2005-06-17 Thread hubert depesz lubaczewski
On 6/17/05, Kailash Vyas <[EMAIL PROTECTED]> wrote: > for example in case of database crash what would be the steps involved in > recovering it through WAL. just restart the database. postgresql with recover itself using wal files. depesz ---(end of broadcast)---

Re: [ADMIN] checking if user is connected as a superuser?

2005-06-06 Thread hubert depesz lubaczewski
On 6/6/05, Dragan Matic <[EMAIL PROTECTED]> wrote: Is there a way to check if user is a superuser for the given cluster?Thanks in advance select usesuper from pg_user where usename = CURRENT_USER; depesz

Re: [ADMIN] Fast Deletion For Large Tables

2002-10-07 Thread Hubert depesz Lubaczewski
dices disconnect connect delete from ... create indices vacuum analyze disconnect could work better. depesz -- hubert depesz lubaczewski http://www.depesz.pl/ Mój Boże, spraw abym milczał, dop

Re: [ADMIN] INSERT performace.

2002-01-27 Thread hubert depesz lubaczewski
we manage to put 300k records in ca. 2-3 hours. depesz -- hubert depesz lubaczewski http://www.depesz.pl/ ... vows are spoken to be broken ... [enjoy the silence] ... words are meanin