Обсуждение: 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.
Вложения
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.
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
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
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
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. +
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. +
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/
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.