Re: Stack overflow issue
От | Robert Haas |
---|---|
Тема | Re: Stack overflow issue |
Дата | |
Msg-id | CA+TgmoYTfXGJMWDFRisKCEVBr07xsyecA6cNQTnti305MbcsDg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Stack overflow issue (Heikki Linnakangas <hlinnaka@iki.fi>) |
Ответы |
Re: Stack overflow issue
|
Список | pgsql-hackers |
On Fri, Jan 12, 2024 at 10:12 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote: > Here's one goto-free attempt. It adds a local loop to where the > recursion was, so that if you have a chain of subtransactions that need > to be aborted in CommitTransactionCommand, they are aborted iteratively. > The TBLOCK_SUBCOMMIT case already had such a loop. > > I added a couple of comments in the patch marked with "REVIEWER NOTE", > to explain why I changed some things. They are to be removed before > committing. > > I'm not sure if this is better than a goto. In fact, even if we commit > this, I think I'd still prefer to replace the remaining recursive calls > with a goto. Recursion feels a weird to me, when we're unwinding the > states from the stack as we go. I'm not able to quickly verify whether this version is correct, but I do think the code looks nicer this way. I understand that's a question of opinion rather than fact, though. -- Robert Haas EDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: