Обсуждение: postgres patch for autovacuum error in postgres

Поиск
Список
Период
Сортировка

postgres patch for autovacuum error in postgres

От
"tamanna madaan"
Дата:

Hi All

 

I am using postgres-8.1.2 . I am getting the below error while autovacuuming template0 database :

 

2010-08-18 18:36:14 UTC LOG: autovacuum: processing database "template0"

2010-08-18 18:36:14 UTC ERROR: could not access status of transaction 3222599682

2010-08-18 18:36:14 UTC DETAIL: could not open file "pg_clog/0C01": No such file or directory

 

I got to know that this is because of some bug in postgres and has been fixed in postgres-8.1.6.

 

Due to some reason I don’t want to upgrade to  postgres-8.1.6.

 

So, could any of you please confirm if there is any postgres patch with the fix for autovacuum error

, where can I find that patch and can this patch be applied on postgres-8.1.2 .

 

Please reply …

 

Thanks…

Tamanna

Re: postgres patch for autovacuum error in postgres

От
Arjen Nienhuis
Дата:
Maybe you can download the latest version of postgres 8.1 and change
the version number in the source to 8.1.2 and then compile. Would that
solve your problem?

On Thu, Sep 9, 2010 at 10:38 PM, tamanna madaan
<tamanna.madan@globallogic.com> wrote:
> Hi All
>
>
>
> I am using postgres-8.1.2 . I am getting the below error while autovacuuming
> template0 database :
>
>
>
> 2010-08-18 18:36:14 UTC LOG: autovacuum: processing database "template0"
>
> 2010-08-18 18:36:14 UTC ERROR: could not access status of transaction
> 3222599682
>
> 2010-08-18 18:36:14 UTC DETAIL: could not open file "pg_clog/0C01": No such
> file or directory
>
>
>
> I got to know that this is because of some bug in postgres and has been
> fixed in postgres-8.1.6.
>
>
>
> Due to some reason I don’t want to upgrade to  postgres-8.1.6.
>
>
>
> So, could any of you please confirm if there is any postgres patch with the
> fix for autovacuum error
>
> , where can I find that patch and can this patch be applied on
> postgres-8.1.2 .
>
>
>
> Please reply …
>
>
>
> Thanks…
>
> Tamanna

Re: postgres patch for autovacuum error in postgres

От
Scott Marlowe
Дата:
On Thu, Sep 9, 2010 at 2:38 PM, tamanna madaan
<tamanna.madan@globallogic.com> wrote:
> Hi All
>
> I am using postgres-8.1.2 . I am getting the below error while autovacuuming
> template0 database :
>
>
> Due to some reason I don’t want to upgrade to  postgres-8.1.6.

There are very very very few good reasons to not want to upDATE to the
latest minor version.

I understand that maybe in the past, some big software vendor shoved
out updates and bug fixes and changes in behaviour with each minor
upgrade  PostgreSQL is NOT LIKE THAT.  Minor upgrades from 8.1.2 to
8.1.21 are safe bets, and you'll be fixing bugs you haven't even had
to deal with yet

Seriously, just update to 8.1.21 and be done with it.

--
To understand recursion, one must first understand recursion.

Re: postgres patch for autovacuum error in postgres

От
Craig Ringer
Дата:
On 09/10/2010 04:38 AM, tamanna madaan wrote:

> Due to some reason I don’t want to upgrade to postgres-8.1.6.

Why? Seriously?

If Oracle announced that they were releasing a patch for six critical
data-loss bugs in 9i, one of which affected you, would you call support
and ask them to make a custom patch just for you that only fixed the one
you had encountered?

If Microsoft released a patch to Internet Explorer that fixed four crash
bugs and a security hole, would you try to extract just the security
hole fix from the patched binary and apply only that change?

Seriously, this makes no sense. In Windows terms, you're  not being told
to upgrade from XP to Vista to fix a bug, or even from XP SP1 to XP SP2.
You're being told to apply a targeted set of fixes - like you receive
from automatic updates - to fix known specific problems without changing
anything else unnecessarily.

--
Craig Ringer

Re: postgres patch for autovacuum error in postgres

От
Craig Ringer
Дата:
> If Oracle announced that they were releasing a patch for six critical
> data-loss bugs in 9i, one of which affected you, would you call support
> and ask them to make a custom patch just for you that only fixed the one
> you had encountered?

Oh, and when they say they can't guarantee that fix will work without
the others, and won't do any QA on it, and that it'll have to be built
using a non-standard and untested compilation environment instead of
their regular update builder, would you still want to go ahead? Even
though, by trying to extract just that one patch, you're actually
changing the whole program completely, making a much bigger, much less
well tested change than you would be by applying the whole official patch?

To me, it makes zero sense.

I think Tom Lane said it best here:
http://www.mail-archive.com/pgsql-general@postgresql.org/msg93045.html

"The real bottom line here, and one I'll reiterate every chance I get,
is that we don't make updates to back branches because we're too bored
to have anything else to do.  If you're on 8.1.5, and the current
release in that branch is 8.1.8, then you're missing some bug fixes
that are probably significant."



Anyway, if you want to suffer through doing this yourself, I *think* the
change in question is from 8.1.7, documented in the release notes as:

"Fix autovacuum to avoid leaving non-permanent transaction IDs in
non-connectable databases (Alvaro). This bug affects the 8.1 branch only."

http://www.postgresql.org/docs/8.1/static/release-8-1-7.html

That should give you something to search the cvs logs for, so you can
extract the patch and apply it to your version.

Here's some documentation on how to get the source code:

http://www.postgresql.org/docs/8.1/static/cvs.html

You can use cvs commands, or a graphical cvs program, to browse the
change history in order to locate the specific change you need, extract
it as a diff, and apply it to a checkout of 8.1.2 cvs.



Some general information on PostgreSQL development:

http://www.postgresql.org/developer/coding

Some related discussion:

http://www.mail-archive.com/pgsql-general@postgresql.org/msg93045.html

http://archives.postgresql.org/pgsql-hackers/2006-03/msg01294.php

http://grokbase.com/topic/2007/08/22/general-could-not-open-file-pg-clog-0bff/sqm2TnwMqn3Aqy-ZXu9e83Ve3jM

http://www.mail-archive.com/pgsql-general@postgresql.org/msg93022.html



.... and I've wasted half an hour on this for no good reason.

--
Craig Ringer

Re: postgres patch for autovacuum error in postgres

От
Scott Marlowe
Дата:
On Thu, Sep 9, 2010 at 8:46 PM, Craig Ringer
<craig@postnewspapers.com.au> wrote:
> On 09/10/2010 04:38 AM, tamanna madaan wrote:
>
>> Due to some reason I don’t want to upgrade to postgres-8.1.6.
>
> Why? Seriously?
>

Also note that it's possible this user has found a new unfixed bug in
the 8.1 branch.  If he goes to 8.1.21 and can still reproduce it he
has a chance of getting some help.  If he's on a custom off shoot of
8.1.2 and 8.1.8 no one's gonna invest the time to figure out if it's a
new bug or not.