pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Uwe Schroeder <uwe@oss4u.com>
To: pgsql-admin@postgresql.org
Subject: Re: error log, tablespace, wal files
Date: Wed, 9 Nov 2011 23:36:24 -0800
Message-ID: <201111092336.24858.uwe@oss4u.com> (raw)
In-Reply-To: <CAC-Lqbpzumfr4zW4+4eca90z5-kEmEaR_cJ0e-s7a=a_E=n0WA@mail.gmail.com>
References: <CAC-Lqbpzumfr4zW4+4eca90z5-kEmEaR_cJ0e-s7a=a_E=n0WA@mail.gmail.com>



> Hello,
> 
>      1) what is tablespace in postgres?
> 
>      2) one more issue is that, I try to rename or delete some file in
> /opt/PostgresPlus/9.0/data/base/16428/ directory.  when I restart postgres
> server, it start normally.  but I thing this is wrong.  I rename or delete
> file into above directory, that means my database(having 16428 oid) is
> corrupted.  So How can my postgres server is started normally?? I want to
> see the log file for that database corruption. Can I see it?? and where???
> and please explain me that what's going on in above case??????
> 
>      3) I want know about pg_xlog(wal) file creation. That means, size of
> wal files and how to create that files and time stamp between creation of
> two different wal files, that means when one file is created on 11:53AM, so
> how much time  after the second file is created?? can we set that time
> stamp???

There are people here better qualified to answer this, but I'll take a shot 
anyways.

1) tablespaces allow you to physically store tables in different directories 
(meaning different disks). So if you have a table that contains gazillions of 
records and needs a lot of space, you could add a disk for that, mount it to 
some directory on your server and create a tablespace on the disk. Then you'd 
tell postgresql to store the large table(s) in that tablespace. 

2) I think - and I certainly may be wrong here - that you will encounter the  
error only when postgresql tries to access data that should be in those files. 
It's kind of like misplacing your car keys - you'll only notice when you need 
them.

3) This depends a lot on your settings in postgresql.conf. To my understanding 
WAL files are majorly depending on the amount of data written to them and not 
based on a time period. If your database does mostly reads, no WAL log will be 
needed, thus the files allocated don't fill up quickly. If you have a lot of 
write operations, the files will fill quickly and once full the next file (up to 
number of WAL files configured) will be created. This one I'm even more fuzzy on 
than #2 - so someone here with more knowledge of the internals may set me 
right.





view thread (5+ messages)  latest in thread

Message-ID: <201111092336.24858.uwe@oss4u.com>
Permalink:  ../201111092336.24858.uwe@oss4u.com/
Also on:    postgresql.org/message-id/201111092336.24858.uwe@oss4u.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: uwe@oss4u.com
  Subject: Re: error log, tablespace, wal files
  In-Reply-To: <201111092336.24858.uwe@oss4u.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox