Not sure why I came again to this interesting paper One WITH RECURSIVE is Worth Many GOTOs. Daily work on Greenplum makes me think and inspires me to learn knowledge in different areas of computer science. This paper was accepted in the same SIGMOD as Greenplum’s HTAP paper and I have a vague impression of it. Recently three tasks in my work made me peruse the paper:
Fix a customer JIRA on recursive CTE
Answer questions from my colleague on the implementation of KNN in Greenplum (I advise using lateral join with some enhancement of Optimizer)
My own spike on the labels as values skill in Greenplum(Postgres)’s expression valuation
This paper uses recursive CTE, Lateral Join and Union All with filters to implement control structure such as Loop, Condition in PLPGSQL. So now is a good time to start a new tour.
Postgres wraps C language’s siglongjmp using macros to provide code style similar to other languages Python, Java, and C++ to handle exceptions. Refer to the src/include/utils/elog.h in Postgres source code to study the skills of Postgres. Chapter 4 of David R Hanson’s book C Interfaces and Implementations also serves as a good reference.
Recently I see a GitHub Issue motion deadlock, previously we have a bunch of PRs to fix related issues, and now it comes again. I feel it is time to look deeply into the problem and jump out of the patches over patches old circles.
Last week I have a discussion with a colleague who is working on improving the analyze-speed of AO|AOCS table in Greenplum (at least 10x speed up). We search the Internet and do not find the performance analysis of Algorithm S and Knuth’s TAOCP left this (mean and var) as exercises. This blog is the solution to Knuth’s exercises.
Greenplum team will do big-standup each workday. The team hosting the big-standup will try to find some interesting games for the whole team to play during the big-standup. Today one colleague comes up with a game to write regular expression for given DFA. The RE is so cute that I cannot resist writing it down.