Re: btvacuumpage useless "orig_blkno"
| От | Alvaro Herrera |
|---|---|
| Тема | Re: btvacuumpage useless "orig_blkno" |
| Дата | |
| Msg-id | 1321913906-sup-7098@alvh.no-ip.org обсуждение исходный текст |
| Ответ на | Re: btvacuumpage useless "orig_blkno" (Simon Riggs <simon@2ndQuadrant.com>) |
| Ответы |
Re: btvacuumpage useless "orig_blkno"
|
| Список | pgsql-hackers |
Excerpts from Simon Riggs's message of lun nov 21 19:11:21 -0300 2011: > On Mon, Nov 21, 2011 at 10:03 PM, Alvaro Herrera > <alvherre@alvh.no-ip.org> wrote: > > I just noticed that btvacuumpage has two BlockNumber parameters -- blkno > > and orig_blkno. The only caller passes them as the same value; the > > header comments state that blkno would be different when recursing, but > > actually the function implements recursion internally by way of a cute > > "goto" trick. So it seems to me that the orig_blkno parameter is > > useless -- we could just remove it. > > > > Unless I'm completely missing something? > > tail recursion - read comments at bottom of the function Right, but we don't need to pass the value as a parameter, we can just save it at the start of the function, as my proposed patch does, right? -- Álvaro Herrera <alvherre@commandprompt.com> The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления: