[ADMIN] Restoring a database as another user

2006-04-28 Thread David Garamond
My goal is to restore someone's (e.g. Jim's) database by the superuser to be owned by a new user (e.g. Bob). Jim and Bob connects using password and I (the superuser) do not know their passwords. Is it possible to do pg_restore, connecting as the superuser, specifying --no-owner, but making so tha

[ADMIN] Autovacuum probably not working?

2006-04-28 Thread Szabolcs BALLA
Hi, I delete 30M record from the db (8.1.0). I made query about size of the tables, but after 1 day the size of the tables not changed. (Autovacuum settings was original) So, I change the autovacuum setting but after another day the size not changed. autovacuum_naptime = 10 autovacuum_vacuum_thre

[ADMIN] Is there an efficient way to check whether a particular index or constraint exists?

2006-04-28 Thread jonathan . lister
An application includes code that optionally does some admin tasks. Rather than just try to create objects, it's presumably better to test if they exist before attempting to create them. So far I can check   if a function exists with:   ps = dbConn.prepareStatement("select count(routin

Re: [ADMIN] Autovacuum probably not working?

2006-04-28 Thread Szabolcs BALLA
Robin Iddon írta: > Szabolcs BALLA wrote: > >> Hi, >> >> I delete 30M record from the db (8.1.0). I made query about size of the >> tables, but after 1 day the size of the tables not changed. (Autovacuum >> settings was original) >> So, I change the autovacuum setting but after another day the size

Re: [ADMIN] Autovacuum probably not working?

2006-04-28 Thread Jason Minion
The only way to recover a large amount of space like that is to issue a vacuum full. Autovacuum will not issue a vacuum full. Vacuuming your tables without vacuum full does not recover space on the system. It marks recoverable space as usable. The idea with autovacuum is that most databases wil

[ADMIN] storing&getting .gif files in db as large objects

2006-04-28 Thread sandhya
Hi,    Can you please tell me will there be any difference if i store .gif file in database? My applcaitions needs to store all types of files in database and read it from DB.But i am facing problem when i am retreving the .gif files from db.I am not able to get the image.I have exported the

Re: [ADMIN] Regarding start postgresql startservice

2006-04-28 Thread mcelroy, tim
Title: RE: [ADMIN] Regarding start postgresql startservice I use the /etc/init.d/postgresql  {start|stop|status|restart|condrestart|condstop|reload|force-reload} command on my Linux boxes and it works great.  I recently installed PG on a couple Solaris boxes and found that the install did no

Re: [ADMIN] Is there an efficient way to check whether a particular

2006-04-28 Thread Ben K.
Are there equivalent ways to check for indeces and constraints? pg_constraint and pg_indexes? Regards, Ben ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining co

Re: [ADMIN] Restoring a database as another user

2006-04-28 Thread Tom Lane
"David Garamond" <[EMAIL PROTECTED]> writes: > My goal is to restore someone's (e.g. Jim's) database by the superuser to be > owned by a new user (e.g. Bob). Jim and Bob connects using password and I > (the superuser) do not know their passwords. I think you'd need a two-step process: pg_

Re: [ADMIN] New system recommendations

2006-04-28 Thread Benjamin Krajmalnik
The stored procedure is a plpgsql function which gets passed parameters from the monitoring agent. It then dynamically creates a device record for the monitored device if one does not yet exist. Once that is done it creates a test record for the particular test if one does not exist. Once that is d

Re: [ADMIN] Trouble installing pltcl language

2006-04-28 Thread Hogan, James F. Jr.
I found my answer this AM…   http://pginstaller.projects.postgresql.org/   One must have Active State TCL software installed First… same goes for the other PL languages like Perl or python.   http://www.activestate.com/   I installed the Free Download for windows…re-started the data

[ADMIN] WAL recovery question - 0000001.history

2006-04-28 Thread Andy Shellam
I've developed and am now testing a new "rolling-WAL" script, and have noticed something a little peculiar with Postgres 8.1.3. Basically I've taken a dump of my live database directory (between pg_start_backup and pg_stop_backup) calls - shipped this to my standby, set up a recovery.conf file (wh

Re: [ADMIN] New system recommendations

2006-04-28 Thread Scott Marlowe
I'm putting both the private email and the thread back on the list, as there's interesting data in here people could use. I don't think I'm betraying any trust here, but if I am, please, let me know... On Thu, 2006-04-27 at 17:37, Benjamin Krajmalnik wrote: > Thanks for the feedback. > I wonder

[ADMIN] Backing up large databases

2006-04-28 Thread Steve Burrows
I am struggling to find an acceptable way of backing up a PostgreSQL 7.4 database. The database is quite large, currently it occupies about 180GB, divided into two elements, a set of active tables and a set of archive tables which are only used for insertions. I ran pg_dump -Fc recently, it

Re: [ADMIN] Backing up large databases

2006-04-28 Thread Andy Shellam
Hi Steve,   Very interested to hear about your setup, as I have a similar setup (backend to a mail server/SPAM scanner) although on a much lighter load at the moment.   My database is only just touching a GB so nothing near the scale of yours!  I use a file-system level backup, and am c

Re: [ADMIN] WAL recovery question - 0000001.history

2006-04-28 Thread Tom Lane
"Andy Shellam" <[EMAIL PROTECTED]> writes: > Basically I've taken a dump of my live database directory (between > pg_start_backup and pg_stop_backup) calls - shipped this to my standby, set > up a recovery.conf file (which calls the rolling-WAL script). This script > is designed to wait until the

Re: [ADMIN] New system recommendations

2006-04-28 Thread Benjamin Krajmalnik
Title: Re: [ADMIN] New system recommendations Concerning the aggregation, no – I am not running aggregate functions on the database itself. Let’s take a small example.  Let’s say I am aggregating avg ping time on an hourly basis. I have, inside the table declarations, structures with an a

[ADMIN] questions on toast tables

2006-04-28 Thread Warren Little
I have a toast table that is referenced by a single user table define below: CREATE TABLE casedocument ( pid varchar(12) NOT NULL, createdt timestamp NOT NULL, descr varchar(40), docformat varchar(10) NOT NULL, version int4 NOT NULL, casepid varchar(12) NOT NULL, createuserpid varch

Re: [ADMIN] Backing up large databases

2006-04-28 Thread Robin Iddon
Hi Steve, If you can afford to move forwards to 8.x then you can benefit from PITR (Point In Time Recovery). See http://www.postgresql.org/docs/8.0/interactive/backup-online.html You can do this without making a PITR live replica (as I understand it, you're happy to trust your hardware so y

Re: [ADMIN] questions on toast tables

2006-04-28 Thread Tom Lane
Warren Little <[EMAIL PROTECTED]> writes: > 3) I know that once upon a time the table had a bytea column, but that > was dropped. Do I need to do a full vacuum on that table to get rid of > the related toast data? Yup. (I take it it was a pretty darn bulky bytea column, too)

Re: [ADMIN] questions on toast tables

2006-04-28 Thread Warren Little
Tom, I'll run the vacuum over the weekend and see how that goes. And, yes, large pdf documents (4-24mb a piece). thanks On Fri, 2006-04-28 at 16:03 -0400, Tom Lane wrote: > Warren Little <[EMAIL PROTECTED]> writes: > > 3) I know that once upon a time the table had a bytea column, but that > >

Re: [ADMIN] Backing up large databases

2006-04-28 Thread Rafael Martinez
On Fri, 2006-04-28 at 15:57 +, Steve Burrows wrote: > > Anybody with any ideas? The database is being used as the backend for > a mail server, so it has transactions 24 hours a day but is quieter at > night. I want to be able to back it up or replicate it on a daily > basis with minimum downt

Re: [ADMIN] Backing up large databases

2006-04-28 Thread alex.cotarlan
You could archive the data as you perform the dump pg_dump  | bzip2  > filename.bz2   bzip2 offers an excellent compression and you could end up with an archive with less than 10GB   Later you can reload that into another db on a different server   -Original Message- From:

Re: [ADMIN] Backing up large databases

2006-04-28 Thread Uwe C. Schroeder
Why don't you set up a second server with identical database and use Slony to replicate the primary one there. You can then do whatever you want on the mirror - dump it on a tape, etc. On Friday 28 April 2006 08:57, Steve Burrows wrote: > I am struggling to find an acceptable way of backing up