New to PostgreSQL, experienced in Oracle. Trying to understand what PGDATA is.
Reading about it, it seems to contain what is necessary to create the initial Database cluster.
I did and install and I am converting some data from Oracle. The path the installation put PGDATA by default is in a file system that is fairly small. So I am looking to move it into a bigger file system.
So my questions are:
Thanks
The base directory in PostgreSQL (data_dir/base) is the folder is where PostgreSQL stores all the data you have inserted in your databases. It contains all the sub-directories which are used by a database in your clusters.
The temporary files that get created in base/pgsql_tmp during query execution will get deleted when the query is done. You should not delete them by hand. These files have nothing to do with temporary tables, they are use to store data for large hash or sort operations that would not fit in work_mem .
pg_tblspc: it's in a non-default tablespace. 16709: it's in the tablespace with oid 16709. PG_9.
The shared_buffers parameter determines how much memory is dedicated to the server for caching data. The value should be set to 15% to 25% of the machine's total RAM. For example: if your machine's RAM size is 32 GB, then the recommended value for shared_buffers is 8 GB.
One major difference between oracle and postgres is documentation quality. If you plan to work with postgres - make some time (a day ot two) to read it.
You can find full description for postgres files here: http://www.postgresql.org/docs/current/static/storage-file-layout.html
Generally you do not need to move your whole DB if you do not want. You can create a tablespace outside postgres data directory (via linux symlink).
Still you may want to move your whole DB to a bigger (faster?) FS. PGDATA directory contains Write Ahead Log (similar to Oracle REDO log). Slow operations on WAL mean slow DB in general. The size of the WAL files depends on DB setting and activity - you may want to be sure there is enough free space for it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With