Formatting code for PostgreSql


show source only

{{parent page="DataBase"}}

===PostgreSQL topics===
~ [[PostgresqlInstall Installation]]
~ [[PostgresqlTuning Tuning]]
~ [[PostgresqlBackup Backup and Restore]]
~ [[PostgresqlRoles Users and Roles]]
~ [[PostgresqlPHPSample PHP Connect Sample]]
~ [[PostgresqlSize Database or table size]]

==vacuum==
When the database is in trouble, do a full database vacuum in standalone mode.

%%
postgres -D /usr/local/pgsql/data some_database
vacuum full;

OR
If vacuum full is not possible,
vacuumdb -a -z
%%

==List databases==
%%
psql -l
%%

==Create database==
%%
CREATE DATABASE d1 WITH OWNER=some_user ENCODING='UTF8' ;
%%

==Query running processes==
%%
select * from pg_stat_activity;
%%
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki