Lists: | pgsql-hackers |
---|
From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Typo in ginxlog.c |
Date: | 2006-05-02 19:01:06 |
Message-ID: | 20060502190106.GA17285@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Just noticed a typo in newly added ginxlog.c. I don't have line
numbers, but in ginRedoSplit() it reads:
PageSetLSN(rpage, lsn);
PageSetTLI(lpage, ThisTimeLineID);
MarkBufferDirty(rbuffer);
PageSetLSN(lpage, lsn);
PageSetTLI(lpage, ThisTimeLineID);
MarkBufferDirty(lbuffer);
Notice the first call to PageSetTLI should be
PageSetTLI(rpage, ThisTimeLineID);
I wonder why don't we have a macro or function to do both things in one
pass?
--
Alvaro Herrera http://www.amazon.com/gp/registry/CTMLCN8V17R4
"¿Qué importan los años? Lo que realmente importa es comprobar que
a fin de cuentas la mejor edad de la vida es estar vivo" (Mafalda)
From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Typo in ginxlog.c |
Date: | 2006-05-04 07:46:54 |
Message-ID: | 1146728814.449.225.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Tue, 2006-05-02 at 15:01 -0400, Alvaro Herrera wrote:
> Just noticed a typo in newly added ginxlog.c. I don't have line
> numbers, but in ginRedoSplit() it reads:
>
> PageSetLSN(rpage, lsn);
> PageSetTLI(lpage, ThisTimeLineID);
> MarkBufferDirty(rbuffer);
>
> PageSetLSN(lpage, lsn);
> PageSetTLI(lpage, ThisTimeLineID);
> MarkBufferDirty(lbuffer);
>
>
> Notice the first call to PageSetTLI should be
>
> PageSetTLI(rpage, ThisTimeLineID);
>
Well spotted. We'd have not corrected that until someone's db failed.
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com
From: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Typo in ginxlog.c |
Date: | 2006-05-04 17:17:53 |
Message-ID: | 20060504171753.GI97354@pervasive.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
On Thu, May 04, 2006 at 08:46:54AM +0100, Simon Riggs wrote:
> On Tue, 2006-05-02 at 15:01 -0400, Alvaro Herrera wrote:
> > Just noticed a typo in newly added ginxlog.c. I don't have line
> > numbers, but in ginRedoSplit() it reads:
> >
> > PageSetLSN(rpage, lsn);
> > PageSetTLI(lpage, ThisTimeLineID);
> > MarkBufferDirty(rbuffer);
> >
> > PageSetLSN(lpage, lsn);
> > PageSetTLI(lpage, ThisTimeLineID);
> > MarkBufferDirty(lbuffer);
> >
> >
> > Notice the first call to PageSetTLI should be
> >
> > PageSetTLI(rpage, ThisTimeLineID);
> >
>
> Well spotted. We'd have not corrected that until someone's db failed.
It also begs the question of if there should be a function/macro that
handles those 3 steps...
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461