daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. show data_directory;
  2.    
  3. show all;
  4.    
  5. SELECT * FROM pg_tablespace;
  6.    
  7. <POSTGRESQL_DIRECTORY>/data/base/<OID>
  8.    
  9. ps aux | grep postgres | grep -- -D
  10.    
  11. CREATE TABLESPACE dbspace LOCATION '/data/dbs';
  12. CREATE TABLE something (......) TABLESPACE dbspace;
  13. CREATE TABLE otherthing (......) TABLESPACE dbspace;
  14.    
  15. SELECT oid from pg_database WHERE datname = <database_name>;
  16.    
  17. SELECT relname, relfilenode FROM pg_class WHERE relname = <table_name>;
  18.    
  19. PG_VERSION      pg_dynshmem     pg_multixact
  20. pg_snapshots    pg_tblspc       postgresql.conf
  21. base            pg_hba.conf     pg_notify  
  22. pg_stat         pg_twophase     postmaster.opts
  23. global          pg_ident.conf   pg_replslot
  24. pg_stat_tmp     pg_xlog         postmaster.pid
  25. pg_clog         pg_logical      pg_serial
  26. pg_subtrans     postgresql.auto.conf    server.log
  27.    
  28. pg_ctl -D /usr/local/var/postgres -w start
RAW Paste Data
Top