From: mh Date: Sun, 8 Dec 2002 05:41:19 +0000 (+0000) Subject: rename MAINTENANCE to MAINTENANCE.postgresql as it is more appropriate considering... X-Git-Tag: MIR_1_0_0_RC4~27 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;ds=sidebyside;h=6964bc916fce4e24e6b528dfaf020c3c1d8aec69;p=mir.git rename MAINTENANCE to MAINTENANCE.postgresql as it is more appropriate considering it's content --- diff --git a/doc/MAINTENANCE b/doc/MAINTENANCE deleted file mode 100755 index df5cae54..00000000 --- a/doc/MAINTENANCE +++ /dev/null @@ -1,39 +0,0 @@ -To dump mir database : - pg_dumplo -a -d -s /dumpdir/dir - pg_dump -c -D -f /dumpdir/.sql -this generates a dir with all blobs and a sql-file with all data. - -To restore the database: - psql < .sql - pgdump_lo -i -d -s /dumpdir/dir - -Every once in a while (or make a script) postgresql database should -be "cleaned". See postgresql docs for commands VACUUM and VACUUM ANALYZE - -Every once in a while (or make a script) postgresql database should -be "cleaned". See postgresql docs for commands VACUUM and VACUUM ANALYZE - -We also have misc. perl scripts to merge Large Objects from other DB's. -these can be used as a basis to write your own custom scripts. - -USER MANAGMENT IN POSTGRESQL - --- set owner of datbase -select * from pg_database; -select * from pg_user; -update pg_database set datdba=ID_FROM_PG_USER where datname=DATABASENAME - --- find all tables to grant privs / select is just building sql --- to be exectued - -select 'grant all on '||relname||' to "de_indy";' -from pg_class -where relname not like 'pg%' -order by relname; - --- alter table owner / select is just building sql --- to be exectued -select 'alter table '||relname||' owner to "de_indy";' -from pg_class -where relname not like 'pg%' -order by relname; \ No newline at end of file diff --git a/doc/MAINTENANCE.postgresql b/doc/MAINTENANCE.postgresql new file mode 100755 index 00000000..df5cae54 --- /dev/null +++ b/doc/MAINTENANCE.postgresql @@ -0,0 +1,39 @@ +To dump mir database : + pg_dumplo -a -d -s /dumpdir/dir + pg_dump -c -D -f /dumpdir/.sql +this generates a dir with all blobs and a sql-file with all data. + +To restore the database: + psql < .sql + pgdump_lo -i -d -s /dumpdir/dir + +Every once in a while (or make a script) postgresql database should +be "cleaned". See postgresql docs for commands VACUUM and VACUUM ANALYZE + +Every once in a while (or make a script) postgresql database should +be "cleaned". See postgresql docs for commands VACUUM and VACUUM ANALYZE + +We also have misc. perl scripts to merge Large Objects from other DB's. +these can be used as a basis to write your own custom scripts. + +USER MANAGMENT IN POSTGRESQL + +-- set owner of datbase +select * from pg_database; +select * from pg_user; +update pg_database set datdba=ID_FROM_PG_USER where datname=DATABASENAME + +-- find all tables to grant privs / select is just building sql +-- to be exectued + +select 'grant all on '||relname||' to "de_indy";' +from pg_class +where relname not like 'pg%' +order by relname; + +-- alter table owner / select is just building sql +-- to be exectued +select 'alter table '||relname||' owner to "de_indy";' +from pg_class +where relname not like 'pg%' +order by relname; \ No newline at end of file