Re: [ADMIN] Get a list of ALL tables

2007-11-19 Thread adey
This usually does it for me:- select * from -- information_schema.tables pg_catalog.pg_tables --WHERE -- table_schema = 'public' --ORDER BY -- table_name On 11/20/07, Kevin Kempter <[EMAIL PROTECTED]> wrote: > > Sorry, I meant to send this to the list: > > > We have a handful of tables

Re: [ADMIN] how to check objects dependency??

2007-10-31 Thread adey
Doesn't ownership also apply to views and stored procs... On 11/1/07, Scott Marlowe <[EMAIL PROTECTED]> wrote: > > On 10/31/07, Jessica Richard <[EMAIL PROTECTED]> wrote: > > I am trying to drop a user but it complained with the following message: > > > > ERROR: role "joe" cannot be dropped becau

[ADMIN] Daylight Savings Updates

2007-09-19 Thread adey
Hi, Please advise whether it is necessary for us to apply a later version of Postgres in preparation for the new daylight savings times coming in to effect in New Zealand at the end of September? We are running PG 8.1.4 and 8.1.6. FAQ's indicate that our one remaining system on 7.1.4 will use the o

Re: [ADMIN] Lock Statistics

2007-07-30 Thread adey
On 7/31/07, Michael Fuhr <[EMAIL PROTECTED]> wrote: > > On Tue, Jul 31, 2007 at 10:35:25AM +1200, adey wrote: > > -- CAUTION: this query may impact system performance as you are > selecting > > from system tables > > What difference are you expecting that to m

Re: [ADMIN] Lock Statistics

2007-07-30 Thread adey
Try this query for a start, and add system tables to the join to find what you want:- -- displays locks with database name and username, but not table -- CAUTION: this query may impact system performance as you are selecting from system tables select relation , c.relname , u.usename , pid

Re: [ADMIN] No create table

2007-07-26 Thread adey
Did your cammand fail, or did it work, but the user can still create tables? On 7/27/07, Anderson Alves de Albuquerque <[EMAIL PROTECTED]> wrote: I need to use a user that can not have permission to create table in one BD. I use revoke, I tray with "revoke all on database XXX to|from USERN

Re: [ADMIN] High Avaliable in the PostgreSQL.

2007-05-30 Thread adey
HP was providing CA (Continuous Access) software that was claimed to provide WAN SAN replication by repeating IO in exactly the sequence it was generated on the master, to the slave. SO while there was a delay, updates on the slave would be sequentially intact, providing a good level of integrity

Re: [ADMIN] Cript for DISK SPACE USE psql

2007-04-17 Thread adey
Try this:- -- Query returns size of a database calculated from the no. 8k pages allocated to tables SELECT -- * sum( relpages*8/1024 ) as MB FROM pg_class WHERE -- relname != '' -- relname = 'document' relnamespace = '2200' On 4/16/07, Trula Thomas <[EMAIL PROTECTED]> wrote: Hello, would anyo

Re: [ADMIN] Checking a size of a given database

2007-04-17 Thread adey
I found the following script useful; for calculating database size:- -- Query returns size of a database calculated from the no. 8k pages allocated to tables SELECT sum( relpages*8/1024 ) as MB FROM pg_class WHERE -- relname != '' -- relname = 'tablename' relnamespace = '2200' On 4/17/07, Chuck

Re: [ADMIN] Can't restore a pg_dump due to encoding errors

2007-04-07 Thread adey
We had a similar conversion conflict some time back whe upgrading and found using a search for anything not A-Z, 0-9, etc, was useful to find offensive data and fix it. On 4/8/07, Dan Harris <[EMAIL PROTECTED]> wrote: Hello all: I'm in a bit of a bind here. Today is my maintenance window for

Re: [ADMIN] PGSQL manager password lost.

2006-11-22 Thread adey
If you do a pgdump -s will dump out schema only from the Postgres database. Much of this will be usable in SQL server to at least create your basic database and objects. You will then need to interpret the remianing more complex structures and build them / adapt the DDL, to work in SQL Server. If

Re: [ADMIN] Monitoring PostgreSQL Process

2006-11-22 Thread adey
The following query with the stats_command_string parameter turned on will give you some of the SQL per transaction:- SELECT datid, datname as "DB Name", substr(procpid,1,6) as "Procpid", substr(usesysid,1,5) as "UseSysid", usename, current_query as "SQL", query_start FROM pg_stat_activity order

Re: [ADMIN] Use Jobs

2006-11-13 Thread adey
? >> Jim C. Nasby escreveu:>> >On Wed, Nov 08, 2006 at 09:29:28PM +1300, adey wrote:> >> >> >>Jim - is there a component that needs to be installed on the database > >>server> >>with Postgres that PGAdmin communicates with please, or is only PGAdm

Re: [ADMIN] Issue with processes open for clients

2006-11-13 Thread adey
Is there not a parameter in Postgres to timeout idle connections? On 11/11/06, imad <[EMAIL PROTECTED]> wrote: I found it on postgresql archives: http://archives.postgresql.org/pgsql-admin/2004-09/msg00261.phpThis post was by Tom Lane, I hope this is what you want.It will time out by itself eventua

Re: [ADMIN] Move indexes

2006-11-13 Thread adey
Drop the index and recreate it in the new tablespace. On 11/13/06, Alexander Burbello <[EMAIL PROTECTED]> wrote: Hi,I have one tablespace with all my objects.I would like to separate indexes from other. How can I select and move with SQL???Thank you for your help.---(end of

Re: [ADMIN] Use Jobs

2006-11-09 Thread adey
11/9/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote: On Wed, Nov 08, 2006 at 09:29:28PM +1300, adey wrote:> Jim - is there a component that needs to be installed on the database server > with Postgres that PGAdmin communicates with please, or is only PGAdmin> required?I know there's

Re: [ADMIN] Use Jobs

2006-11-08 Thread adey
Jim - is there a component that needs to be installed on the database server with Postgres that PGAdmin communicates with please, or is only PGAdmin required? Adrian  On 11/8/06, Jim C. Nasby <[EMAIL PROTECTED]> wrote: On Tue, Nov 07, 2006 at 03:34:36PM -0200, Alexander Burbello wrote:> Where can I

Re: [ADMIN] Question

2006-11-07 Thread adey
I think the following query should list clustered indexes for you:-   select * from pg_indexwhere indisclustered = 't'  On 11/8/06, Mark Steben <[EMAIL PROTECTED]> wrote: Thank you, Jeff.  That worked like a champ.  My initial problemHad to do with not understanding the concept of OID datatypes. My

Re: [ADMIN] How do I adjust max_fsm_pages

2006-11-07 Thread adey
When last did you do a FULL vacuum and analyse the stats report at the end? On 1/2/90, amar buwa <[EMAIL PROTECTED]> wrote: Hi, My postgresql configuration ismax_locks_per_transaction = 256  max_connections = 200   shared_buffers = 6000  max_fsm_pages = 20  max_fsm_relations = 1500My server

Re: [ADMIN] pg_dump/pg_restore problem

2006-10-05 Thread adey
I had a similar experience when we upgraded from 7.4 to 8.1.4. When we attempted the restore in 8.1.4 / UTF8, it failed and told us the offending row. We edited the original database to correct the data and retried. There were several ofending rows, but fortunatley for the exact same value, so we c

Re: [ADMIN] WAL configuration and REINDEX

2006-09-25 Thread adey
Hi Tom, Further to my request below, the following recommendation exists in the Postgres 8.1 documentation:- http://www.postgresql.org/docs/8.1/interactive/routine-reindex.html   On 9/25/06, adey <[EMAIL PROTECTED]> wrote: Thanks Tom. How does Postgres handle page splits and redirecti

Re: [ADMIN] best way to choose index to cluster on?

2006-09-25 Thread adey
A good guide for a clustered index is:- Will the index be unique, static and narrow. If not, avoid clustered indexing as they require extra work on disk to maintain their sequence.  On 9/26/06, Chris Hoover <[EMAIL PROTECTED]> wrote: I am looking to squeeze a bit more speed out of my database by cl

Re: [ADMIN] WAL configuration and REINDEX

2006-09-24 Thread adey
AIL PROTECTED]> wrote: adey <[EMAIL PROTECTED]> writes:> I apologise if I am uninformed, but it is my understanding that REINDEX is > still required even with the most regular of vacuums?REINDEX shouldn't be required at all under normal circumstances.   regards, tom lane

Re: [ADMIN] WAL configuration and REINDEX

2006-09-24 Thread adey
I apologise if I am uninformed, but it is my understanding that REINDEX is still required even with the most regular of vacuums? On 9/22/06, Jim Nasby <[EMAIL PROTECTED]> wrote: On Sep 21, 2006, at 6:40 AM, Jose Manuel Garci a Valladolid wrote:> I have a PostgreSQL 8.1.4 server under Linux Red Hat

Re: [ADMIN] vacuumdb exclude tables option?

2006-08-09 Thread adey
Does autovacuum replace the need for a FULL vacuum please (to recover free space, etc)? On 8/10/06, Scott Marlowe <[EMAIL PROTECTED]> wrote: On Wed, 2006-08-09 at 13:24, Joel Stevenson wrote:> Hi,>> I have a database that includes both highly transactional tables and > archive tables - OLTP and OLA

Re: [ADMIN] How to know the sizes of all tables & indexes in a database

2006-08-09 Thread adey
Try:-   SELECT relname, relpages, CAST(reltuples AS numeric) , ( (relpages*8192)/1024 ) as MBFROM pg_class   ...which will give you space used on disk for all data pages currently in use per table (assuming you have 8k data pages - the default).  On 8/9/06, Sharma;G.S. <[EMAIL PROTECTED]> wrote:

Re: [ADMIN] Performance tuning question

2006-08-09 Thread adey
A vacuum full analyze might help. On 8/8/06, Benjamin Krajmalnik <[EMAIL PROTECTED]> wrote: Chris,I just finished running some benchmarks on an underpowered servercompared to the one I am running in production. My initial tests were run on an ampty database, pg_xlog on the samespindle.Stored proced

Re: [ADMIN] how to increase performance of Postgre

2006-08-02 Thread adey
How much RAM do you have, and what is your SHMMAX set to? On 8/1/06, Javanesevn <[EMAIL PROTECTED]> wrote: Hi all,My project ( web application) is using Postgre 8.1 and PHP 4.x (ADOlibrary to access database). And I would like to increase perfomance, so I changed configuration follow this:shared_bu

Re: [ADMIN] What's using all my RAM?

2006-08-02 Thread adey
t;[EMAIL PROTECTED]> wrote: On Tue, 2006-08-01 at 23:09, adey wrote:> Please could someone tell me how to discover what is using all of my > RAM?> I am trying to run a vacuum against Postgres, but it fails immediately> with:->> "ERROR:  out of memory> DETAIL:  Failed o

[ADMIN] What's using all my RAM?

2006-08-01 Thread adey
Please could someone tell me how to discover what is using all of my RAM? I am trying to run a vacuum against Postgres, but it fails immediately with:-   "ERROR:  out of memoryDETAIL:  Failed on request of size 1073741820."   TOP shows the following:- Mem:   4077544k total,  3897868k used,   179676

Re: Fwd: [ADMIN] vacuuming template0 gave ERROR

2006-07-30 Thread adey
Thanks Tom - datfrozenxid has been the same for at least the last month on template0 and 1 On 7/31/06, Tom Lane <[EMAIL PROTECTED]> wrote: adey <[EMAIL PROTECTED]> writes:> select datname, age(datfrozenxid), datfrozenxid, current_date, current_time > FROM pg_database> If t

Fwd: [ADMIN] vacuuming template0 gave ERROR

2006-07-30 Thread adey
I have the discussion below in which it is advised that template0 should not be touched, however, my production v8.1.4 template0 and 1 database XID "age", determined with the following query, changes constantly:-   select datname, age(datfrozenxid), datfrozenxid, current_date, current_time FROM p

Re: [ADMIN] VACUUM ANALYZE suddenly taking forever

2006-07-27 Thread adey
Try running pgstattuple on some of the tables that have not had vacuum full, and some of those that have. It will tell you how many dead tuples there are in the table, which is an indicator of how seriously the table needs a full vacuum.   Run IPCS on the Unix command line to see how much of your

Re: [ADMIN] Task/Jobs issue

2006-07-25 Thread adey
If you manage to get "Jobs" working, please could you help me get mine going? On 7/21/06, Shoaib Mir <[EMAIL PROTECTED]> wrote: HI Michael,You can try using an addon like pgjobs ( http://gborg.postgresql.org/project/pgjobs/projdisplay.php)Thanks,  Shoaib Mir EnterpriseDB On 7/21/06, Michael Gross

Re: [ADMIN] UTF8 characters

2006-07-25 Thread adey
I had the same problem when upgrading v7.4 database to v8, SQL-ASCII to UTF8 - we had to replace single backslashes with double backslashes in the v7 database to get the data to display correctly, then dump and restore in v8 / UTF8. Have we done something wrong please? On 7/22/06, Peter Eisentraut

Re: [ADMIN] Tables not restored from V7.4 to v8.1.4

2006-07-19 Thread adey
We found corrupt data today in production that cannot be converted to UTF8. We are in the process of coorecting the data values. Thanks for your response. On 7/19/06, Aaron Bono <[EMAIL PROTECTED]> wrote: On 7/17/06, adey <[EMAIL PROTECTED] > wrote: We recently backed up ou

Re: [ADMIN] Recycle error logs

2006-07-17 Thread adey
Many thanks to all of you that helped with this. On 7/18/06, Scott Marlowe <[EMAIL PROTECTED]> wrote: On Sat, 2006-07-15 at 02:37, adey wrote:> Please advise if there is a way to start a fresh Postgresql error / > output log at regular intervals?> We are tuning a "new toprod

[ADMIN] Tables not restored from V7.4 to v8.1.4

2006-07-17 Thread adey
We recently backed up our production database (dumpall) on Postgres v7.4 and restored on v8.1.4. All of the tables restored except three. The tables were created, but their data wasn't applied. I can see the tables in the dump file, and no errors were reported in the restore. What am I missing plea

[ADMIN] Recycle error logs

2006-07-15 Thread adey
Please advise if there is a way to start a fresh Postgresql error / output log at regular intervals? We are tuning a "new toproduction" system, so I have all the SQL logged, but the file gets too big and cumbersome, so I'd like to start a new one each morning without restarting Postgres.

[ADMIN] Where are the temporary work / sort files please

2006-07-12 Thread adey
The postgresql parameter explanation for work_mem say :-   "Another way to set this value is to monitor the Postgres temp files(in PGDATA/base/DB_OID/pgsql_tmp) and adjust sort_memupward if you see a lot of queries swapping from these temp files."   ...but I can't find pgsql_tmp in my v8.1.4 instal

Re: [ADMIN] PG slowdown

2006-07-12 Thread adey
If you turn WAL logging off (via fsynch parameter in .conf), it is my understanding that you will no longer log database updates, and will therefore not be able to recover any uncommitted transactions in the event of failure, (which seems contradictory to database practice).   Gut feel to me says

Re: [ADMIN] Performance Slowly Decreasing As Database Grows

2006-07-10 Thread adey
Check the stats at the end of your vacuum to ensure your max_fsm_pages (free space map) is large enough. Also check work_mem and maintenance_work_mem are not running at defaults that may be too small. If you have many updates, increase the number of wal_buffers and checkpoint_segments. On 7/11/06,

Re: [ADMIN] lock a database from new connections, without modifying pg_hba.conf

2006-07-10 Thread adey
Can hba be manipulated in such a way to make Postgres "read only" to obtain a complete and full backup please, and if so, how? On 5/19/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: > Is that possible?  I've checked the docs for 8.1, and am not finding> anyth

[ADMIN] PGAdmin "Jobs"

2006-07-06 Thread adey
Please assist me in implementing this for the first time? I have installed Postgres 8.1.4 on my laptop, including Admin, then accessed the database "postgres" from PGAdmin 1.4.2 and run the "pgagent.sql" script tp populate the database with the following result:-   NOTICE:  CREATE TABLE / PRIMARY

[ADMIN] pgpool

2006-07-05 Thread adey
Please could someone give me an idea of what pgpool is, and where I can research it? I have run a search on postgresql.org and found many references, but they don't explain what it is, and it doesn't appear in the documentation index of the v8.1 manuals.

[ADMIN] Where do I execute the DISCONNECT command?

2006-06-27 Thread adey
Please could you tell me where I must execute the following to disconnect idle transactions in Potgres:-   EXEC SQL DISCONNECT [connection-name];   I've tried variations of this syntax in PGAdmin, psql, and the Linus command line in both v8.1.4 and v7.4.2 - all of which fail. COuld you also tell me

Re: [ADMIN] Autovacuum ideas

2006-04-15 Thread adey
If autovacuum is to be provided with facilities for individual table and time window controls, that can be done currently using VACUUM TABLE FULL. Currently this must be scheduled in crontab - a task scheduler in PGAdmin would be very helpful to do this instead of crontab that usually requires sysa

Re: [ADMIN] Bloated pg_shdepend_depender_index

2006-04-02 Thread adey
Please could someone help me with my questions below? On 3/25/06, adey <[EMAIL PROTECTED]> wrote: Two questions in this regard please? 1) Is tuple theory not the root of this problem 2) Vacuum does much the same as a traditional database reorg, and online reorgs are a reality now   1

[ADMIN] Fwd: Notice Processor hook

2006-03-26 Thread adey
uum run by automated script. -- Forwarded message --From: adey <[EMAIL PROTECTED]>Date: Mar 14, 2006 8:51 AMSubject: Notice Processor hook To: Tom Lane <[EMAIL PROTECTED]> Hi Tom, A colleague found this entry from yourself in thescripts.com:-   "Adam H.Pendleton" &

Re: [ADMIN] Bloated pg_shdepend_depender_index

2006-03-26 Thread adey
In vacuum full output, indexes are listed as having been vacuumed along with their table. Have I misinterpreted this message saying that vacuum is incapable of vacuuming indexes (and reindex is the only option to do so) please?  On 3/25/06, Tom Lane <[EMAIL PROTECTED]> wrote: Peter Eisentraut <[EMA

Re: [ADMIN] Bloated pg_shdepend_depender_index

2006-03-24 Thread adey
Two questions in this regard please? 1) Is tuple theory not the root of this problem 2) Vacuum does much the same as a traditional database reorg, and online reorgs are a reality now   1) If I understand tuple theory correctly, copies of rows are created through normal Postgres processing, that exp

[ADMIN] Delete performance

2006-02-20 Thread adey
Please give me some guidance? We are attempting many deletes in our production database for the first time, and we're getting nowhere fast. The SQL runs for more than 12 hours to delete 2 million rows, and hasn't finished each time we've tried it as we've had to cancel it. I have tried running quer

[ADMIN] Latest GA (Generally Available) version

2006-01-12 Thread adey
Please tell me where I can regularly find what the current generally available (not beta) version of Postgres is, and what the current version is?

Re: [ADMIN] How to determine database activity???

2005-10-30 Thread adey
Try this query that displays current activity:-   select  datid,  datname as "DB Name",  substr(procpid,1,6) as "Procpid",  substr(usesysid,1,5) AS "UseSysid",  usename,  current_query as SQL,  query_startfrom  pg_stat_activityorder by  procpid   You may need to turn on some of the parameters in p

Re: [ADMIN] vacuum message

2005-09-26 Thread adey
That's only 1.8mb of RAM, so I can't see it being a problems if you have no RAM shortage on your server. On 9/27/05, Gourish Singbal <[EMAIL PROTECTED]> wrote:   Thats a good Idea.   My output after full vaccum is :-   INFO:  free space map: 9 relations, 114736 pages stored; 76592 total pages need

[ADMIN] How much shared memory am I using please?

2005-09-12 Thread adey
A "free" command on my linux server returns the following:-   total   used   free  shared    buffers cachedMem:   4077400    3958256 119144  0 104208    1551116-/+ buffers/cache:    2302932    1774468Swap:  284   4744    1995

[ADMIN] Stats turned on but not being updated

2005-09-08 Thread adey
Please tell me what I'm missing? My stats Postgres 7.4 parameters are as follows:-   stats_start_collector = truestats_command_string = truestats_block_level = truestats_row_level = truestats_reset_on_server_start = true  After turning all of these on, I restarted Postgres, then ran a table query a

[ADMIN] How to determine date / time of last postmaster restart

2005-09-06 Thread adey
Please let me know if there is a way to determine when the Postmaster was last restarted? This is for tuning. I have stats_reset_on_server_start turned on, but I don't know when last the Postmaster was started, so I can't determine the period my current system stats cover.

[ADMIN] A good reference book for Postgresql administration

2005-09-05 Thread adey
Has anyone found the book "PostgreSQL Essential Reference" by Barry Stinson useful in administering Postgresql please? I'm looking for a comprehensive reference rather than a history or introduction to databases and SQL, and would like to know how suitable this book would be.   Your opinion would

Re: [ADMIN] Any way to see what queries are currently running?

2005-08-15 Thread adey
You could try the following query after enabling the stats_command_string parameter in the postgresql.conf file:- -- displays current activity in the database -- postgresql.conf parameter stats_command_string populates the current_query -- column select datid, datname as "DB Name",