Unix Technical Forum

Re: [GENERAL] Corrupt database? 8.1/FreeBSD6.0

This is a discussion on Re: [GENERAL] Corrupt database? 8.1/FreeBSD6.0 within the Pgsql Patches forums, part of the PostgreSQL category; --> Tom Lane wrote: > Alvaro Herrera <alvherre@commandprompt.com> writes: > > Maybe we could forcibly activate the freeze mode on ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 10:18 AM
Alvaro Herrera
 
Posts: n/a
Default Re: [GENERAL] Corrupt database? 8.1/FreeBSD6.0

Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:


> > Maybe we could forcibly activate the freeze mode on a template database?

>
> Might not be a bad idea. And even more to the point, forcibly disable
> analyze.


Patch implementing this (albeit untested!) attached. I'll try to
reproduce the problem without the patch, and then test with the patch
applied.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 10:18 AM
Alvaro Herrera
 
Posts: n/a
Default Re: [GENERAL] Corrupt database? 8.1/FreeBSD6.0

Alvaro Herrera wrote:
> Tom Lane wrote:
> > Alvaro Herrera <alvherre@commandprompt.com> writes:

>
> > > Maybe we could forcibly activate the freeze mode on a template database?

> >
> > Might not be a bad idea. And even more to the point, forcibly disable
> > analyze.

>
> Patch implementing this (albeit untested!) attached. I'll try to
> reproduce the problem without the patch, and then test with the patch
> applied.


Ok, it does what it's intended to do. But in testing it I also
confirmed that a database-wide vacuum creates a pgstat entry for it and
for all tables in it. Is this something we want to prevent?

I'll apply this patch later today to the 8.1 branch unless somebody
objects.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 10:18 AM
Tom Lane
 
Posts: n/a
Default Re: [GENERAL] Corrupt database? 8.1/FreeBSD6.0

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Ok, it does what it's intended to do. But in testing it I also
> confirmed that a database-wide vacuum creates a pgstat entry for it and
> for all tables in it. Is this something we want to prevent?


That's odd, because I didn't see any such thing when I tested in CVS tip
the other day. Or did you have stats_block_level turned on?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-18-2008, 10:19 AM
Alvaro Herrera
 
Posts: n/a
Default Re: [GENERAL] Corrupt database? 8.1/FreeBSD6.0

Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Ok, it does what it's intended to do. But in testing it I also
> > confirmed that a database-wide vacuum creates a pgstat entry for it and
> > for all tables in it. Is this something we want to prevent?

>
> That's odd, because I didn't see any such thing when I tested in CVS tip
> the other day. Or did you have stats_block_level turned on?


Yes, I turned it on for this test.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-18-2008, 10:19 AM
Tom Lane
 
Posts: n/a
Default Re: [GENERAL] Corrupt database? 8.1/FreeBSD6.0

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane wrote:
>> Alvaro Herrera <alvherre@commandprompt.com> writes:
>>> Ok, it does what it's intended to do. But in testing it I also
>>> confirmed that a database-wide vacuum creates a pgstat entry for it and
>>> for all tables in it. Is this something we want to prevent?

>>
>> That's odd, because I didn't see any such thing when I tested in CVS tip
>> the other day. Or did you have stats_block_level turned on?


> Yes, I turned it on for this test.


Well, the vacuums certainly accounted for I/O, so I suppose this is
reasonable behavior.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-18-2008, 10:21 AM
Bruce Momjian
 
Posts: n/a
Default Re: [GENERAL] Corrupt database?


Has this been applied, and should it be?

---------------------------------------------------------------------------

Alvaro Herrera wrote:
> Tom Lane wrote:
> > Alvaro Herrera <alvherre@commandprompt.com> writes:

>
> > > Maybe we could forcibly activate the freeze mode on a template database?

> >
> > Might not be a bad idea. And even more to the point, forcibly disable
> > analyze.

>
> Patch implementing this (albeit untested!) attached. I'll try to
> reproduce the problem without the patch, and then test with the patch
> applied.
>
> --
> Alvaro Herrera http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.


[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings


--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-18-2008, 10:26 AM
Bruce Momjian
 
Posts: n/a
Default Re: [pgsql-patches] [GENERAL] Corrupt database?8.1/FreeBSD6.0


What is the status of this patch?

---------------------------------------------------------------------------

Alvaro Herrera wrote:
> Tom Lane wrote:
> > Alvaro Herrera <alvherre@commandprompt.com> writes:

>
> > > Maybe we could forcibly activate the freeze mode on a template database?

> >
> > Might not be a bad idea. And even more to the point, forcibly disable
> > analyze.

>
> Patch implementing this (albeit untested!) attached. I'll try to
> reproduce the problem without the patch, and then test with the patch
> applied.
>
> --
> Alvaro Herrera http://www.CommandPrompt.com/
> The PostgreSQL Company - Command Prompt, Inc.


[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings


--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-18-2008, 10:26 AM
Joshua D. Drake
 
Posts: n/a
Default Re: Re: [pgsql-patches] [GENERAL] Corrupt database? 8.1/FreeBSD6.0

Bruce Momjian wrote:
> What is the status of this patch?


Alvaro is currently out of town. He should be able to provide more info
next week.

Sincerely,

Joshua D. Drake

>
> ---------------------------------------------------------------------------
>
> Alvaro Herrera wrote:
>> Tom Lane wrote:
>>> Alvaro Herrera <alvherre@commandprompt.com> writes:
>>>> Maybe we could forcibly activate the freeze mode on a template database?
>>> Might not be a bad idea. And even more to the point, forcibly disable
>>> analyze.

>> Patch implementing this (albeit untested!) attached. I'll try to
>> reproduce the problem without the patch, and then test with the patch
>> applied.
>>
>> --
>> Alvaro Herrera http://www.CommandPrompt.com/
>> The PostgreSQL Company - Command Prompt, Inc.

>
> [ Attachment, skipping... ]
>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 5: don't forget to increase your free space map settings

>



--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-18-2008, 10:27 AM
Alvaro Herrera
 
Posts: n/a
Default Re: [pgsql-patches] [GENERAL] Corrupt database? 8.1/FreeBSD6.0

Bruce Momjian wrote:
>
> What is the status of this patch?


This was applied:

2007-01-14 17:18 alvherre

* src/backend/postmaster/autovacuum.c:

Fix autovacuum to avoid leaving non-permanent Xids in non-connectable
databases.

Apply to the 8.1 branch only, as the new 8.2 (and HEAD) coding does not have
this problem.


> ---------------------------------------------------------------------------
>
> Alvaro Herrera wrote:
> > Tom Lane wrote:
> > > Alvaro Herrera <alvherre@commandprompt.com> writes:

> >
> > > > Maybe we could forcibly activate the freeze mode on a template database?
> > >
> > > Might not be a bad idea. And even more to the point, forcibly disable
> > > analyze.

> >
> > Patch implementing this (albeit untested!) attached. I'll try to
> > reproduce the problem without the patch, and then test with the patch
> > applied.



--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:37 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com