pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
error log, tablespace, wal files
5+ messages / 4 participants
[nested] [flat]

* error log, tablespace, wal files
@ 2011-11-10 06:29 Karuna Karpe <karuna.karpe@os3infotech.com>
  2011-11-10 07:36 ` Re: error log, tablespace, wal files Uwe Schroeder <uwe@oss4u.com>
  2011-11-11 02:54 ` Re: error log, tablespace, wal files Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 2 replies; 5+ messages in thread

From: Karuna Karpe @ 2011-11-10 06:29 UTC (permalink / raw)
  To: pgsql-admin

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???

Please any one explain me above points.

Regards,
Karuna karpe.

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: error log, tablespace, wal files
  2011-11-10 06:29 error log, tablespace, wal files Karuna Karpe <karuna.karpe@os3infotech.com>
@ 2011-11-10 07:36 ` Uwe Schroeder <uwe@oss4u.com>
  2011-11-10 08:58   ` Re: error log, tablespace, wal files Scott Marlowe <scott.marlowe@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Uwe Schroeder @ 2011-11-10 07:36 UTC (permalink / raw)
  To: pgsql-admin



> 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.





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: error log, tablespace, wal files
  2011-11-10 06:29 error log, tablespace, wal files Karuna Karpe <karuna.karpe@os3infotech.com>
  2011-11-10 07:36 ` Re: error log, tablespace, wal files Uwe Schroeder <uwe@oss4u.com>
@ 2011-11-10 08:58   ` Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Scott Marlowe @ 2011-11-10 08:58 UTC (permalink / raw)
  To: Uwe Schroeder <uwe@oss4u.com>; +Cc: pgsql-admin

On Thu, Nov 10, 2011 at 12:36 AM, Uwe Schroeder <uwe@oss4u.com> wrote:
>
>
>> 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??????

Any idea what was in that?  Have you tried truncating the table that
was behind it?  Assuming it was a table.



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: error log, tablespace, wal files
  2011-11-10 06:29 error log, tablespace, wal files Karuna Karpe <karuna.karpe@os3infotech.com>
@ 2011-11-11 02:54 ` Craig Ringer <ringerc@ringerc.id.au>
  2011-11-11 05:10   ` Re: error log, tablespace, wal files Karuna Karpe <karuna.karpe@os3infotech.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Craig Ringer @ 2011-11-11 02:54 UTC (permalink / raw)
  To: Karuna Karpe <karuna.karpe@os3infotech.com>; +Cc: pgsql-admin

On 11/10/2011 02:29 PM, Karuna Karpe wrote:

>       1) what is tablespace in postgres?

It's a way of putting some tables, indexes, etc into a different part of 
your system's storage. Sometimes you want to do this to put a really big 
table on slower, cheaper storage. Sometimes you might want to put 
indexes on really fast but expensive or small and limited storage. It's 
also useful for splitting up tables that're often accessed concurrently 
so they're on different disk arrays and don't compete with each other 
for I/O. There are lots of uses.

>       2) one more issue is that, I try to rename or delete some file in
> /opt/PostgresPlus/9.0/data/base/16428/ directory.

Don't do that!

Do not mess with anything in the PostgreSQL data directory unless you 
know *EXACTLY* what you are doing.

>  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??

Because it hasn't needed to access that file yet. When it does, it'll 
report errors for attempts to access that file but will otherwise 
continue to function normally.

PostgreSQL doesn't try to verify the whole database on startup. Imagine 
how long that'd take!

> 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??????

You need to figure out what you deleted by looking in pg_catalog, then 
attempt to access it.

It'd be nice if there were a built-in tool or utility to verify a 
database catalog against the on-disk contents, but it's never supposed 
to be necessary. The need only arises when someone does something silly 
or when a file system goes bad - and in the latter case, who says it's 
the catalog that's correct?

--
Craig Ringer



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: error log, tablespace, wal files
  2011-11-10 06:29 error log, tablespace, wal files Karuna Karpe <karuna.karpe@os3infotech.com>
  2011-11-11 02:54 ` Re: error log, tablespace, wal files Craig Ringer <ringerc@ringerc.id.au>
@ 2011-11-11 05:10   ` Karuna Karpe <karuna.karpe@os3infotech.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Karuna Karpe @ 2011-11-11 05:10 UTC (permalink / raw)
  To: Craig Ringer <ringerc@ringerc.id.au>; +Cc: pgsql-admin

Thanks to all for giving solution.

On Fri, Nov 11, 2011 at 8:24 AM, Craig Ringer <ringerc@ringerc.id.au> wrote:

> On 11/10/2011 02:29 PM, Karuna Karpe wrote:
>
>       1) what is tablespace in postgres?
>>
>
> It's a way of putting some tables, indexes, etc into a different part of
> your system's storage. Sometimes you want to do this to put a really big
> table on slower, cheaper storage. Sometimes you might want to put indexes
> on really fast but expensive or small and limited storage. It's also useful
> for splitting up tables that're often accessed concurrently so they're on
> different disk arrays and don't compete with each other for I/O. There are
> lots of uses.
>
>
>       2) one more issue is that, I try to rename or delete some file in
>> /opt/PostgresPlus/9.0/data/**base/16428/ directory.
>>
>
> Don't do that!
>
> Do not mess with anything in the PostgreSQL data directory unless you know
> *EXACTLY* what you are doing.
>
>
>   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??
>>
>
> Because it hasn't needed to access that file yet. When it does, it'll
> report errors for attempts to access that file but will otherwise continue
> to function normally.
>
> PostgreSQL doesn't try to verify the whole database on startup. Imagine
> how long that'd take!
>
>
>  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??????
>>
>
> You need to figure out what you deleted by looking in pg_catalog, then
> attempt to access it.
>
> It'd be nice if there were a built-in tool or utility to verify a database
> catalog against the on-disk contents, but it's never supposed to be
> necessary. The need only arises when someone does something silly or when a
> file system goes bad - and in the latter case, who says it's the catalog
> that's correct?
>
> --
> Craig Ringer
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2011-11-11 05:10 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-11-10 06:29 error log, tablespace, wal files Karuna Karpe <karuna.karpe@os3infotech.com>
2011-11-10 07:36 ` Uwe Schroeder <uwe@oss4u.com>
2011-11-10 08:58   ` Scott Marlowe <scott.marlowe@gmail.com>
2011-11-11 02:54 ` Craig Ringer <ringerc@ringerc.id.au>
2011-11-11 05:10   ` Karuna Karpe <karuna.karpe@os3infotech.com>

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