Want to know how the sausage is made in Postgres? This meetup will be a hands on walkthrough of how the development of the open source PostgreSQL project works.
We'll show you how to get a development version of Postgres running and wow its version 20! We'll also show you how updates to the code base are suggested, discussed, reviewed, and committed. If you're curious about being a Postgres hacker or just want a deeper look into the project, this will be a fun meetup.
We'll also take a peek at the patch review process in case anyone in the group is interested in participating in the actual open source process. You will need a community email here (https://www.postgresql.org/).
Bios
David Christensen has been a PostgreSQL hacker since 2010 (\conninfo) and he has a new GROUP BY ALL feature coming soon hopefully in Postgres 20.
Elizabeth Christensen is a PostgreSQL contributor - mostly doing advocacy work but does have a first patch in!
Length
60 min
Future events
Links and nodes
-
pg_stat_login - PostgreSQL extension that tracks login statistics
-
What we know about the xz Utils backdoor that almost infected the world
Transcript
1 00:00:02.080 --> 00:00:12.019 Gabor Szabo: So, hello and welcome to the Code Maven channel, or the Database Maven meeting today. If you are
2 00:00:12.090 --> 00:00:31.550 Gabor Szabo: here, in this meeting, then welcome, and I would like to welcome Elizabeth and David, the two speakers for today. If you are watching this on YouTube, then also welcome. Below the video, you will find a link to the future events, and to notes about this event.
3 00:00:31.630 --> 00:00:38.570 Gabor Szabo: And various links there. And please like the video and follow the channel so you will get updated.
4 00:00:38.690 --> 00:00:40.040 Gabor Szabo: Emm…
5 00:00:40.170 --> 00:00:55.129 Gabor Szabo: And that's it for you. Those who are here, feel free to ask questions, as we discussed earlier, either just speaking or in the chat. We'll try to get an answer to you.
6 00:00:55.930 --> 00:01:03.849 Gabor Szabo: And that's it. Again, thank you very much, Elizabeth and David, for agreeing to give this presentation, and the stage is yours.
7 00:01:04.910 --> 00:01:20.079 Elizabeth Christensen: Thank you. Thank you so much, Gabor, for the invitation to be here. It's always fun to be in a new group of database and tech folks, so, I appreciate the opportunity to kind of get into a new
8 00:01:20.260 --> 00:01:38.999 Elizabeth Christensen: community. Yeah, we're gonna talk today about how does PostgreSQL get made. Obviously Postgres is a hugely popular database right now. I think it's, the last, like, Stack Overflow survey. 60% of developers use Postgres.
9 00:01:39.190 --> 00:01:53.570 Elizabeth Christensen: And, you know, lots of folks are curious and are on some stage of adoption. So, I am Elizabeth Christensen. I work at Snowflake. My primary job is open source advocacy.
10 00:01:53.570 --> 00:02:16.779 Elizabeth Christensen: So I'm extremely fortunate that, I get to talk to people about open source projects and work in an open source community, and do lots of education. So my main job is Postgres education. I do a lot of talks and write blogs, and I'm on the board of the U.S. Postgres Association, which is the professional
11 00:02:17.150 --> 00:02:22.250 Elizabeth Christensen: association that supports, like, Postgres events and professional development in the U.S.
12 00:02:22.490 --> 00:02:43.009 Elizabeth Christensen: So yeah, that's kind of a little bit about me. I'm also married to a longtime Postgres contributor, David Christensen. I actually joke that I married into Postgres, which is true. When David and I met and were dating, I…
13 00:02:43.010 --> 00:02:47.440 Elizabeth Christensen: worked, on a support project, I worked on a database.
14 00:02:48.020 --> 00:03:06.470 Elizabeth Christensen: For academic journals and peer review, and I worked on SQL Server, and David helped me out of a couple jams, and helped me write some pretty complicated queries with some fancy joins back in the day before you had an LLM help you write SQL, and
15 00:03:06.660 --> 00:03:19.039 Elizabeth Christensen: David and I have actually been working together for, I don't know, I think, like, 12 or 13 years at this point. So, yeah, I'll let David introduce himself. He has a much longer history in Postgres than I do, but,
16 00:03:19.900 --> 00:03:21.340 Elizabeth Christensen: Take it away, David.
17 00:03:21.840 --> 00:03:37.539 David Christensen: Yeah, so I'm David Christensen, I've been doing tech stuff forever, you know, started, kind of, my professional career in 2001, which was my first exposure to Postgres, I think it was version 6.5.
18 00:03:37.540 --> 00:03:51.850 David Christensen: So, 25 years ago, kind of had done, you know, a bunch of web development, back-end work, front-end work, got into this professional consulting, started getting into the actual
19 00:03:51.850 --> 00:03:58.000 David Christensen: Postgres consulting, so helping people tune databases, working on
20 00:03:58.000 --> 00:04:13.090 David Christensen: database replication. There was a project called Picardo, which was kind of a multi-primary, data sync back in the days before Postgres, supported that natively. So kind of, you know, started kind of interacting with the Postgres community.
21 00:04:13.090 --> 00:04:36.789 David Christensen: probably around 2009, 2010, started speaking at different, conferences and whatnot. So kind of continued the development. We ended up at Crunchy Data, which is a full-time Postgres company. Crunchy got acquired by Snowflake, about a year and a half ago. So, been working for Snowflake since then. I basically work on,
22 00:04:37.190 --> 00:04:43.909 David Christensen: extensions and Postgres internals, so working at kind of the low-level, Postgres C code.
23 00:04:43.910 --> 00:05:06.859 David Christensen: So yeah, kind of been interested in working with Postgres, both as a user, as a kind of a SQL-level consultant, and an internals person for, quite some time. So, have a number of patches in Postgres, have one I've been working on lately, too, which I think is gonna demo as part of the, thing. But yeah, good to meet you, everybody. Also, long history in Perl.
24 00:05:06.860 --> 00:05:12.259 David Christensen: So that was kind of fun to see all these Pearl guys, because it's a bit of a flashback for me, so…
25 00:05:14.150 --> 00:05:19.109 Elizabeth Christensen: Yeah, alright. And I… so kind of the way this is gonna work is I'm gonna take us through…
26 00:05:19.610 --> 00:05:35.699 Elizabeth Christensen: just some stuff to get started. I'm gonna talk, a little bit about how Postgres works, how the community works, and stuff like that. And then David's gonna talk a little bit about his experience, and then he's gonna go through doing some local testing.
27 00:05:35.700 --> 00:05:41.449 Elizabeth Christensen: Through this CommitFast app, and, and kind of how, how patches are tested.
28 00:05:41.800 --> 00:05:45.109 Elizabeth Christensen: And then we can kind of open it up to Q&A after that.
29 00:05:45.170 --> 00:06:05.590 Elizabeth Christensen: Since I'm talking to a new group, I'm gonna tell you about a few things that I do in Postgres that you might be, interested in finding out about. I host a Postgres virtual meetup, very similar to kind of what Gabor has here. We just talk about Postgres, and it's, for a global audience.
30 00:06:05.590 --> 00:06:12.240 Elizabeth Christensen: We have lots of local meetups, but not everyone lives somewhere where they can make it to a meetup. In our December
31 00:06:12.480 --> 00:06:20.069 Elizabeth Christensen: a speaker is gonna talk about Postgres 19 and 20, and some of the things, happening later, but we have a speaker every month.
32 00:06:20.070 --> 00:06:37.169 Elizabeth Christensen: I think, Anthony, you mentioned you had a Postgres extension. I know it sounds like a couple of you do more, in-depth things with Postgres. We're always looking for talks, so if any of you have an idea, there's a form on the website to pitch me an idea.
33 00:06:38.160 --> 00:06:42.150 Elizabeth Christensen: I've done a lot of Postgres education projects.
34 00:06:42.200 --> 00:06:54.149 Elizabeth Christensen: I like to kind of call out this, like, Postgres playground. You can find this online under the Crunchy Data, like, Postgres Tutorials site.
35 00:06:54.150 --> 00:07:02.960 Elizabeth Christensen: This is a good place to start if you're brand new to Postgres and you've never seen any line of Postgres and you don't know how it works.
36 00:07:02.960 --> 00:07:14.470 Elizabeth Christensen: This is a little series of Postgres tutorials that run in a web browser. They run using, basically, a WebAssembly kind of thing, where,
37 00:07:14.610 --> 00:07:29.809 Elizabeth Christensen: the Postgres database runs in a web browser and then just uses your browser memory, to actually run a database. But you can kind of use, you know, see what Postgres does, learn a little bit about it, without going through any kind of.
38 00:07:29.810 --> 00:07:34.799 Elizabeth Christensen: Installation or, you know, code compiling, process.
39 00:07:36.250 --> 00:07:55.709 Elizabeth Christensen: I'm just gonna call out the Postgres Weekly newsletter for folks that are interested in learning more about Postgres and what's going on. I don't work for Postgres Weekly, I don't have an affiliation with them, but they are a great, resource for Postgres stuff. This is run by a guy named Peter Cooper.
40 00:07:56.110 --> 00:08:14.689 Elizabeth Christensen: And it kind of covers everything happening in Postgres, so if you're curious about stuff happening with Supabase or Neon or Tiger Data, like, they cover a lot of ground, and they kind of keep track of, you know, blogs and events and things that are happening in the Postgres world that are… that are worth knowing about.
41 00:08:16.310 --> 00:08:24.919 Elizabeth Christensen: I'm also due a lot, with the PostGIS extension for Postgres. I think somebody mentioned that when we were chatting earlier.
42 00:08:24.920 --> 00:08:42.229 Elizabeth Christensen: So for those that don't know, Postgres has a geospatial extension called PostGIS, and that lets you store GIS points, lines, and polygons, and then also has routing extensions and other things for.
43 00:08:42.230 --> 00:08:53.619 Elizabeth Christensen: for doing lots of geospatial stuff. This is an online event that we're hosting, next week, and if you're curious about geospatial stuff, it's a fun event, and then all of that stuff is on YouTube later.
44 00:08:54.650 --> 00:09:02.570 Elizabeth Christensen: Alright, let's kind of talk about… I'm just gonna start at the top with kind of how, Postgres versions work.
45 00:09:02.570 --> 00:09:17.819 Elizabeth Christensen: So Postgres now is on a pretty stable cadence in terms of release timing. A new version of Postgres comes out every fall. Postgres 19 is, should be out here next week. It's had quite
46 00:09:17.820 --> 00:09:37.869 Elizabeth Christensen: quite a bit of a delay. I have a blog about what's happening with Postgres 19, if you're curious, like, I think you can just Google, like, what's happening with Postgres 19, and my blog will come up, but essentially, like, you know, we're living in a world of a lot of large language model stuff, and so…
47 00:09:38.170 --> 00:09:54.350 Elizabeth Christensen: folks have taken, you know, some deeper looks at a lot of features that got added to Postgres 19, you know, in the last year, and some of the new models are so advanced that they were able to find, you know, find some edge cases and find bugs.
48 00:09:54.350 --> 00:10:04.059 Elizabeth Christensen: And so what happened in Postgres 19 is quite a few things that were supposed to come out got reverted, and then they just took a little bit more time testing things.
49 00:10:04.110 --> 00:10:07.449 Elizabeth Christensen: And then it should be out here in the next couple weeks.
50 00:10:08.360 --> 00:10:28.409 Elizabeth Christensen: Postgres 18 is the newest production version of Postgres that's out right now. This little diagram is outdated. I think Postgres… all the new minor point versions came out, I think, today, so I think it's 18.7, which is, like, the new, newest minor release of Postgres 18.
51 00:10:28.410 --> 00:10:42.600 Elizabeth Christensen: And then 17, 16, and 15 are all supported. Postgres 14 just went end of life this month, so that's no longer gonna be supported by the community. And that's how they kind of do it. They'll roll on.
52 00:10:43.150 --> 00:10:52.550 Elizabeth Christensen: off one new, one older version as they roll on a new version, so they usually keep about 5 active versions of Postgres at a time.
53 00:10:52.780 --> 00:10:55.450 Elizabeth Christensen: So as the new version, like.
54 00:11:02.440 --> 00:11:20.250 Elizabeth Christensen: As we're kind of, you know, starting to do address 20 is what's open for commits. We'll pitch, patch ideas, and then, you know, those go through the process. There's lots of things that didn't make it into 19, and things that didn't make it into 17 or 18, even, that they might push, and try to get into version 20.
55 00:11:20.530 --> 00:11:33.839 Elizabeth Christensen: David will talk a little bit about the patch that he had that's kind of hopefully moving… moving to 20, I think, from having been proposed in 18, and then maybe proposed in 19, and then reverted.
56 00:11:34.710 --> 00:11:41.359 Elizabeth Christensen: So the Postgres code, lives in a,
57 00:11:41.360 --> 00:11:58.279 Elizabeth Christensen: kind of a private repository, that's just git.postgresql.org. You can, you know, have your computer or whatever pull things from this. Only, project committers can write to that repository.
58 00:11:58.660 --> 00:12:07.669 Elizabeth Christensen: There is a repository in GitHub, if you want to just look up, you know, GitHub slash Postgres, you can actually get to the codebase.
59 00:12:07.670 --> 00:12:32.370 Elizabeth Christensen: This is what's called a mirror, and so it's just mirroring that other Git repository. You can test anything you want from the GitHub repo. You know, you can fork it if you want to mess around with stuff, but you can't contribute to Postgres there. You can't put a pull request up to the GitHub repo. All of Postgres still today, in terms of how the
60 00:12:32.370 --> 00:12:36.889 Elizabeth Christensen: A code is operating, operates, as an email list project.
61 00:12:38.050 --> 00:12:56.889 Elizabeth Christensen: So the way that new code gets sent to Postgres is, you know, some kind of new idea would come in, you know, lots of little things, they might be bugs, they might be big things, you know, ideas for future improvements, and then, committers, you know, it'll go through a pretty extensive review process.
62 00:12:56.890 --> 00:13:15.550 Elizabeth Christensen: Once somebody, who's a commit, there's, like, 35 or so Postgres committers, one of those folks has to pick up a patch and actually commit it to the code repo. You know, most things kind of fail in this review, you know, finding a committer phase.
63 00:13:17.120 --> 00:13:30.730 Elizabeth Christensen: And then there's a release management team that kind of schedules, how we're gonna do all the releases, and then, there's a ton of packaging work that goes, into any Postgres release, you know, those are kind of…
64 00:13:30.730 --> 00:13:43.860 Elizabeth Christensen: for folks that do lots of software stuff, know that, like, packagers are, like, the unsung heroes of the entire software ecosystem. But yeah, there's a lot of packaging to make sure that Postgres works in
65 00:13:43.860 --> 00:13:58.260 Elizabeth Christensen: you know, Macs, and, you know, all kinds of Linux environments, and, you know, Microsoft operating systems, and all kinds of different stuff, and not to mention lots of different extensions that have to kind of go through all this packaging, too.
66 00:13:58.590 --> 00:14:09.610 Elizabeth Christensen: And then there's a core team of Postgres that's, like, a few folks, and they usually coordinate, kind of, that official public announcement, and they'll have some, you know, public,
67 00:14:09.610 --> 00:14:20.620 Elizabeth Christensen: you know, documentation, so when Postgres 19 comes out here in the next couple weeks, they'll have an official kind of release notes that you can kind of go through, and they coordinate all those announcements.
68 00:14:22.490 --> 00:14:32.539 Elizabeth Christensen: So, Postgres has tons of mailing lists. This is kind of how almost all the communication for the project happens.
69 00:14:32.970 --> 00:14:39.960 Elizabeth Christensen: I'm not super actively involved in any of the mailing lists, because my brain just doesn't work like that.
70 00:14:40.240 --> 00:14:51.039 Elizabeth Christensen: The, you know, if you have questions or you just want to, you know, kind of chat with folks in Postgres or get ideas, you can use the novice list or the general list.
71 00:14:51.040 --> 00:15:09.740 Elizabeth Christensen: And then there's a hackers list, and the hackers list is where all of the, like, code, the patches that, you know, you're gonna try to get into a core version of Postgres get posted, and that's where all the discussion and review happens, is in that hackers list.
72 00:15:09.960 --> 00:15:14.270 Elizabeth Christensen: Hackers is kind of a fire hose, like, I wouldn't recommend getting on it.
73 00:15:14.280 --> 00:15:30.069 Elizabeth Christensen: Because it's… it's tons and tons of stuff. I've been on it a few different times, and it's… it's just… it's just a ton of email volume, and it's pretty overwhelming. But if you want to learn a lot about Postgres in a short time, you could do that by reading the mailing list.
74 00:15:31.770 --> 00:15:43.520 Elizabeth Christensen: The nice thing about the Postgres mailing list is that they're archived, so you don't actually have to sign up and get the email. You can literally just go into, the
75 00:15:43.520 --> 00:15:55.249 Elizabeth Christensen: the, you know, Postgres mailing list, and just click on the archive and see any of the email threads that have been happening. And these are up-to-date, so the mailing list software kind of facilitates
76 00:15:55.250 --> 00:16:12.410 Elizabeth Christensen: this really nice archive. And every kind of thread, you know, is… it's got some really nice, like, threading features, so you can kind of read. This here on the screen right now is a thread about, the… the draft of the PG-19 release notes.
77 00:16:12.870 --> 00:16:23.140 Elizabeth Christensen: And so, you know, you can kind of see what folks are saying, and then you can go back and dig into, like, other messages that might be related, or if you want to kind of read things
78 00:16:23.210 --> 00:16:27.090 Elizabeth Christensen: In a thread, it helps you kind of see what's happened.
79 00:16:27.100 --> 00:16:51.189 Elizabeth Christensen: You know, for minor stuff, this isn't a big deal, but if you're like me, occasionally I'll do some pretty deep testing on, like, a new feature that came out. I like to test all the new features that have come out in Postgres 19, and typically what that means is I've got to go back, like, there will be some documentation in Postgres, but it's possible that that's not complete.
80 00:16:51.300 --> 00:17:03.499 Elizabeth Christensen: And it's also possible that there's some things that have happened in the discussion that really kind of fill in a lot of questions about what the feature is, and how it was sort of tested, and…
81 00:17:03.890 --> 00:17:26.490 Elizabeth Christensen: So I'll go back through lots of features that make it in, to kind of understand how they work, and then, if you ever see any of the blogs that I write, like, I wrote some blogs on, like, the hint features and… and other new features in Postgres, you know, lots of… lots of research goes into that kind of, project, and so these mailing list threads help me do a lot of that work.
82 00:17:28.310 --> 00:17:47.040 Elizabeth Christensen: You know, in general, the hackers list, if you're curious about what's happening in Postgres, it's open, so, you know, like I said, you can see that archive, and you can get, you can submit to hackers without actually being a member of it. I've done that before, so because
83 00:17:47.040 --> 00:17:52.609 Elizabeth Christensen: It, like, if you submit something and it… they'll reply all, they'll reply to you.
84 00:17:53.040 --> 00:18:12.830 Elizabeth Christensen: But, you know, in general, don't start posting on hackers. It's not a place for new people, and it's… you're definitely not gonna make any friends in Postgres if you start asking questions on there and, you know, kind of be careful of people's time, when you're using that list.
85 00:18:14.130 --> 00:18:32.860 Elizabeth Christensen: So, you know, for folks that are thinking about, you know, contributing to Postgres, David has a ton more experience with this than I do, so he can, you know, go into it. David's bar for his patients is really high, right? Like, this is not a fast process to get things into Postgres.
86 00:18:33.500 --> 00:18:41.779 Elizabeth Christensen: It's incredibly difficult. I have one small patch that I got into Postgres a couple years ago that was just a documentation patch.
87 00:18:41.790 --> 00:19:04.909 Elizabeth Christensen: But it… it is a lot of feedback. Like, it is a very high level of, like, criticism. You know, in general, that's not personal, right? People are just trying to make the codebase, really good. They're trying to, make sure that it's the best that it can be. But it is a little bit of a different working experience, you know, if you're working… if you're used to working more collaboratively, this is…
88 00:19:04.910 --> 00:19:07.160 Elizabeth Christensen: This is kind of a different experience.
89 00:19:07.450 --> 00:19:24.620 Elizabeth Christensen: So yeah, in general, if you're thinking about getting started in Postgres as a contributor, or you have some ideas, you know, it's a long process, be patient, be ready for some feedback, try not to take it personally, and, you know, try to make it more of a learning experience.
90 00:19:26.650 --> 00:19:39.560 Elizabeth Christensen: Yeah, so, what we're gonna talk a little bit about here, like, once I kind of hand this over to David, is just, how the code review works. So they do lots of, kind of, unit testing and regression.
91 00:19:39.630 --> 00:19:56.359 Elizabeth Christensen: testing, that's kind of a part of it, so it has, like, its own unit tests that come with it, and then you can do kind of your own end-user testing, but Postgres itself has, like, incredibly high standards for getting things in, getting things in the core codebase.
92 00:19:58.320 --> 00:20:19.129 Elizabeth Christensen: Postgres does what's called a commit fast. We'll probably pull this up in a browser in a second when I hand this over to David. So, what they usually do for things that are happening, in a new version of Postgres, like we're on version 20, they'll have these open commit fasts, so there's a commit fast that's running,
93 00:20:19.130 --> 00:20:21.649 Elizabeth Christensen: like, basically for the month of January.
94 00:20:21.690 --> 00:20:40.930 Elizabeth Christensen: And then there's lots of patches listed in here, and then those patches, it kind of says where in the process this patch is. And so some of these are gonna be really complicated, right? They're gonna have, you know, like, you see this top one already has, you know, 5 reviewers on it.
95 00:20:41.980 --> 00:21:00.020 Elizabeth Christensen: And then some of them are gonna be simpler. They have started marking, if you look in the tag dropdown, they have started marking things for, like, you know, easy first review, which basically means, like, you don't need a ton of background information to just check out the patch.
96 00:21:00.100 --> 00:21:10.550 Elizabeth Christensen: But this is kind of all the things that are up for discussion in January. I think when we go through the CommitFest stuff here in a second, we'll kind of show you how this works.
97 00:21:10.550 --> 00:21:20.649 Elizabeth Christensen: You can also comment, like, if you do test something, or you have a… you know, if you happen to know about something specific, you can comment in this. You'll… you'll need a…
98 00:21:21.030 --> 00:21:35.519 Elizabeth Christensen: a login to the PostgreSQL wiki, so if you haven't done that before, there's, like, a 24-hour embargo, so the first time you do it, you have to wait a couple days, just, I think, to cut down on the, like, robot traffic.
99 00:21:37.450 --> 00:21:55.829 Elizabeth Christensen: But yeah, so, there is kind of a new effort in Postgres to bring new contributors into the project. They've started this, like, hacking Discord. This is started by a person who's a long-time Postgres contributor named Robert Haas.
100 00:21:56.360 --> 00:22:10.269 Elizabeth Christensen: And I know he's really trying to do more to kind of mentor folks and bring folks along, because working in the core, you know, Postgres ecosystem is not the easiest thing to get started with.
101 00:22:10.270 --> 00:22:22.239 Elizabeth Christensen: One of the things I think is really cool about the… the kind of new mentorship program that they have in the Hacking Discord is they have a patch review mentor program.
102 00:22:22.240 --> 00:22:35.319 Elizabeth Christensen: So this is for folks, like, who, you know, are probably not going to be writing patches, but, you know, they're interested in maybe, being patch reviewers. I know that they are sort of saying.
103 00:22:35.480 --> 00:22:44.199 Elizabeth Christensen: in Postgres that, you know, they would love to have more people reviewing patches, because that's a big part of, you know, what helps
104 00:22:44.200 --> 00:22:56.830 Elizabeth Christensen: helps the entire open source, kind of engine move along. And so what they're doing with the patch mentor program is sort of pairing up new folks who want to, you know.
105 00:22:56.880 --> 00:23:11.650 Elizabeth Christensen: do patch reviews, pairing them up with more experienced patch reviewers, and then they do kind of a pair, they do a phone call, and then they kind of do it together, and then they, you know, help each other write it up, so that when the review comes in.
106 00:23:12.090 --> 00:23:29.829 Elizabeth Christensen: you know, it's kind of something that's been done and kind of thought through with both a more senior person and a new person. But yeah, there's a link to join that Discord server if you want, or I can send it later, if you're curious about getting started with the hacking Discord stuff.
107 00:23:31.040 --> 00:23:42.450 Elizabeth Christensen: But yeah, I will, I think that's what I had for just kind of an intro about how it works. So I'm gonna stop my screen share now and kind of answer a few questions.
108 00:23:42.450 --> 00:23:56.480 Elizabeth Christensen: That folks might have about it, and then I think for the second phase, I'll let David take over, and he'll show you, a little bit about some of his patches, and then actually how to test a patch, and how to get, version 20 running.
109 00:23:57.310 --> 00:23:59.719 Elizabeth Christensen: And it looks like…
110 00:24:00.290 --> 00:24:10.789 Elizabeth Christensen: Somebody asked if the slides are going to be available and other links. I will put those in this, and then hopefully Gabor can grab those and put those in the YouTube recording.
111 00:24:11.900 --> 00:24:23.850 Elizabeth Christensen: And… I think that's it. Did anybody have any other questions or comments for me about, kind of, how the big picture, how the thing… how the PAL Postgres gets made?
112 00:24:24.630 --> 00:24:26.689 Gabor Szabo: So, I have a question, or.
113 00:24:26.690 --> 00:24:27.290 Elizabeth Christensen: Sure.
114 00:24:27.290 --> 00:24:32.520 Gabor Szabo: Yeah, but folks, if you have other people, then please ask.
115 00:24:33.440 --> 00:24:45.390 Gabor Szabo: So, you mentioned that there are separate people, basically, who are doing the patch review, and I'm a little surprised that people who are not
116 00:24:47.070 --> 00:24:48.580 Gabor Szabo: sort of,
117 00:24:48.780 --> 00:25:02.370 Gabor Szabo: That you can introduce people who are not familiar with the code base, because they haven't sent in patches, or that's, like, my understanding, and they are going to do the code reviews, or patch reviews.
118 00:25:02.770 --> 00:25:06.109 Gabor Szabo: How does that… doesn't that…
119 00:25:06.230 --> 00:25:12.790 Gabor Szabo: cause problems that, like, people who are probably less familiar with the… with the codebase do that?
120 00:25:13.310 --> 00:25:38.199 Elizabeth Christensen: Yeah, I mean, I don't think they're the only people doing the reviews, right? I think they're wanting lots of review to be done, so I think when you're saying, you know, every patch is getting lots of reviews, having different kinds of perspectives is helpful, right? Like, I think we all live in a world where, like, diversity of experience is helpful, so if the only people that are ever reviewing patches
121 00:25:38.200 --> 00:25:45.380 Elizabeth Christensen: are people that… it's, like, the same 10 people, then you're not really finding anything new.
122 00:25:45.540 --> 00:25:53.849 Elizabeth Christensen: I've heard this too, right? Like, because I think, like, it's an interesting idea, right? When you ask, like, someone in Postgres, like, okay, I want to get more involved in
123 00:25:54.570 --> 00:26:04.509 Elizabeth Christensen: Postgres, I want to contribute, how do I start contributing? And they say, oh, you should learn how to review patches. But then if you've never done it, how do you review a patch?
124 00:26:04.510 --> 00:26:22.850 Elizabeth Christensen: So I think… I think the idea is more that reviewing patches is a way for people to learn the code base, and to learn more about the process, and to make their time better spent than submitting patches that get rejected.
125 00:26:22.850 --> 00:26:37.669 Elizabeth Christensen: Because the rejection rate for Postgres patches is incredibly high, right? So, if I have, you know, a new extension that I wrote that's really helpful to me, and I want to put it in core Postgres, I write that
126 00:26:37.670 --> 00:26:44.469 Elizabeth Christensen: I write it up as a Postgres patch, and I send it in, and it gets rejected. I haven't learned that much.
127 00:26:44.470 --> 00:27:05.880 Elizabeth Christensen: But, if I've reviewed 5 other patches, and I've kind of seen, okay, these patches got in, here's what they had in them, okay, this one didn't make it, here's what issues it had, I think it kind of gives you a bigger sense of, like, how it works as a project, and I think that's what they're trying to expose people to.
128 00:27:05.880 --> 00:27:15.439 Elizabeth Christensen: So I don't think it's, like, you know, new people are the only patch reviewers, I think they're just trying to, like, help people get started, and this is one way to do it.
129 00:27:16.220 --> 00:27:21.319 Gabor Szabo: So basically, it's the introduction to become a… or to become a contributor.
130 00:27:21.320 --> 00:27:21.780 Elizabeth Christensen: Correct.
131 00:27:21.780 --> 00:27:30.509 Gabor Szabo: Yeah, and do you have, like, statistics of how well this goes? How many people are converting to be…
132 00:27:30.510 --> 00:27:48.689 Elizabeth Christensen: Yeah, this is pretty new, like, we… you know, I ran a bunch of statistics in 2024, like, I was kind of curious in 2024, like, what's the rejection rate, right? And I think the rejection rate is, like, 75%, which honestly is higher than I thought it… I thought it was, like, 99%.
133 00:27:48.820 --> 00:28:00.259 Elizabeth Christensen: We should… I think the mentorship program thing is pretty new, like, I think they did it maybe in 2025. I know that they've been growing it into 2026.
134 00:28:00.300 --> 00:28:13.480 Elizabeth Christensen: Because I know I've been… the person who runs that's name is Paul Youngworth, and I've, you know, worked with him a little bit, and I've done a couple really small little, you know, kind of patch,
135 00:28:13.640 --> 00:28:19.849 Elizabeth Christensen: workshops with him, and so I think they're really growing it out, and I think in a couple years, we'll know.
136 00:28:20.150 --> 00:28:28.779 Elizabeth Christensen: I also think Postgres is at a time right now where they're trying to figure out how much AI they want in this process, right? So I think…
137 00:28:30.350 --> 00:28:42.240 Elizabeth Christensen: patch reviews, I think, are going to be very AI enhanced, right? They want, you know, they're open to people using Claude and other tools to actually help, you know, run the unit tests and do stuff like that.
138 00:28:42.570 --> 00:28:51.359 Elizabeth Christensen: I think they want people actually eyeballs, you know, actually looking at the patches, and then actually handwriting patch reviews.
139 00:28:51.660 --> 00:29:07.280 Elizabeth Christensen: But, you know, obviously, like, every open source project right now, volume-wise, has a lot happening, right? Like, it's really easy to write a patch, and it's really easy to have Claude submit a bug report for you. So, yeah, I think that's…
140 00:29:07.360 --> 00:29:13.669 Elizabeth Christensen: that's a challenge too, right? I think volume is way, way up in Postgres in terms of, like, bug reports.
141 00:29:14.900 --> 00:29:15.500 Gabor Szabo: Thanks.
142 00:29:16.610 --> 00:29:17.420 Gabor Szabo: Thank you.
143 00:29:23.010 --> 00:29:27.320 David Christensen: Any other questions before we get started on my part here?
144 00:29:30.940 --> 00:29:38.440 David Christensen: Okay, well, I guess I gave my introduction earlier. Let me skip my screen share going.
145 00:29:47.160 --> 00:29:52.080 David Christensen: Alright, people can see that, and… Let me…
146 00:29:55.070 --> 00:29:57.430 David Christensen: Can you guys see, web browser here?
147 00:30:00.170 --> 00:30:01.050 Elizabeth Christensen: Yeah, looks good.
148 00:30:01.500 --> 00:30:02.260 David Christensen: Okay.
149 00:30:02.260 --> 00:30:27.209 David Christensen: Yeah, so Elizabeth had talked a little bit about the CommitFest app. So, at this point, this is a huge development for Postgres. You know, in the last 10 years, we used to exclusively, have the version control system be CSV, passing around patch files, literal patch files, and that was the only way that you had any sort of communication. So yeah, through all the mailing lists.
150 00:30:27.210 --> 00:30:45.039 David Christensen: You had your, you know, your MUT running in your screen, in your terminal, and that was kind of the extent of how things got developed. Right now, we actually have some, you know, we realize this is not the easiest way for things to go, and while we don't have,
151 00:30:45.040 --> 00:31:08.379 David Christensen: you know, like, pull request kind of workflow, we've tried to kind of make it so it's a lot easier to navigate some of this, because as Elizabeth mentioned, like, just the volume of the traffic for the Postgres hackers list is such that even if you're somebody who, you know, has been contributing for a long time, it's hard to get any kind of feedback and just be seen in the sheer number of
152 00:31:08.380 --> 00:31:20.890 David Christensen: messages that go through. So somebody, I don't remember who, ended up creating kind of this CommitFest web app to kind of keep track of individual patches, with the idea being,
153 00:31:21.040 --> 00:31:24.720 David Christensen: There's essentially a version release
154 00:31:24.720 --> 00:31:48.230 David Christensen: timeline, which Elizabeth had that nice slide that had kind of the indications. There's several, commit fests for each major version, so they're tagged over here, for the PG20, whatever, because PG-19 is… is being released imminently, so now new commits are going into PG20. we…
155 00:31:48.730 --> 00:32:13.680 David Christensen: The sample feature that I'm going to kind of talk about this is, I wrote a patch to kind of support the group by all SQL syntax, which was a nice little bit that, I've done some work with DuckDB, and they had that, which ended up being kind of a nice little feature. Somebody who ends up using ad hoc queries, trying to be able to do some, like, data exploration, you know, looking for counts, looking for sums, looking for things like that.
156 00:32:13.680 --> 00:32:37.809 David Christensen: not having to specify, you know, fields that you change where, okay, I add multiple fields to my select statement, and I have a count. Now, if I do group by, I have to go add those names or add column offsets and things. So from a kind of an ad hoc data user perspective, it was something that was nice. So, most of my patches have been kind of to scratch some of my personal itches.
157 00:32:37.810 --> 00:32:53.600 David Christensen: I have a patch in Postgres that's the backslash coninfo, command in PSQL, which lets you know when you're connected, how you're connected. It's something super basic. Let's see…
158 00:33:05.820 --> 00:33:06.840 David Christensen: Alright.
159 00:33:08.240 --> 00:33:33.199 David Christensen: So it'll just kind of show you information about it, as far as, like, how you're connected. Pretty basic for this particular thing, but there's lots of variations in connections and how things are, and it ends up showing a lot of details there. So that was one kind of relatively simple patch that I had in. I worked for a long period of time on a series of patches to add transparent data
160 00:33:33.200 --> 00:33:47.090 David Christensen: encryption to Postgres that unfortunately never came to fruition, but was a long interaction with the Postgres community, and kind of, you know, got some attention from some of the more dedicated hackers.
161 00:33:47.090 --> 00:34:08.979 David Christensen: Which basically, you know, let me know why certain things would work, or why certain other things wouldn't work. So, you know, kind of in order to do anything of any substance, you definitely need to kind of get the community on board. A lot of times, you'll need to break your patches up into smaller and smaller pieces that can kind of stand on their own, and then kind of work, to get a larger feature.
162 00:34:08.980 --> 00:34:27.019 David Christensen: on board. But in any case, any of these patches would end up kind of going through the mailing list, primarily. Once you've added, or once you've sent a message, you would create, in the CommitFest app itself, you'd log in, in this case, I'm logged in as my community profile there.
163 00:34:27.020 --> 00:34:36.759 David Christensen: You know, and you'd go ahead and you'd create a new patch. So I'm gonna look, I think I have one already here for, the group by all, I think it's in the current…
164 00:34:36.760 --> 00:34:59.559 David Christensen: Commit fast. Okay, so yes, this is the group by all patch, that's me. There's a reviewer that was here. As things have gone, there's different tags, so this is needing rebased. It's been a couple of weeks since I've looked at this, thing, but basically there's different statuses for it. So I created this
165 00:34:59.560 --> 00:35:04.730 David Christensen: Item, with my original… Email here.
166 00:35:05.700 --> 00:35:19.179 David Christensen: I think Elizabeth had mentioned you kind of have the threads, and this is the entire history. So this patch I'd originally proposed back in, I think, PG-18, and at the time, people did not…
167 00:35:19.210 --> 00:35:44.020 David Christensen: want this because there was no SQL standard definition for this. The SQL standard later added support for group by all, and so it got picked up for PG19, and it did get committed, which was nice, and then it got reverted, which was not as nice, because there were some issues found at beta time that they ended up doing. So, essentially, you know, this patch, you know, if and when it gets in.
168 00:35:44.020 --> 00:35:48.930 David Christensen: We'll have been, you know, 2 or 3 years in development, for…
169 00:35:48.930 --> 00:36:12.530 David Christensen: what is not a super complicated feature, so, like, anything that Postgres has as a major feature has definitely been, in development for years and years and years, just to kind of get everything in place. Anyway, this thread just has a lot of the details, the latest, versions of these, and so you'll attach, multiple, like, next versions, so if I…
170 00:36:12.530 --> 00:36:25.340 David Christensen: After I address, the feedback here, I will include an additional patch, send it to here. The CommitFest app will end up pulling that up itself. Let's see…
171 00:36:26.300 --> 00:36:32.269 David Christensen: And it'll pick up a new version in the emails thing. When…
172 00:36:33.360 --> 00:36:51.269 David Christensen: So, one of the improvements that was added fairly recently is they added a CI system. So, as Gabor mentioned, there's a build farm, which is kind of one way that people test regular versions of Postgres that is based on
173 00:36:51.270 --> 00:37:15.030 David Christensen: the current master branch, or if it's targeting a stable release branch, that's only for branches that are already part of the core Postgres code, so those are things that have already been committed. The build farm tests, like, different compilers, different compiler flags, different operating systems, and so it's one of those things that you want a lot of variation, because Postgres is written
174 00:37:15.050 --> 00:37:19.750 David Christensen: to, you know, run on any number of Unix, like
175 00:37:19.750 --> 00:37:26.219 David Christensen: programs, or operating systems, we basically want to be able to kind of validate that, and so, yeah, volunteers kind of have
176 00:37:26.220 --> 00:37:50.990 David Christensen: the ability to regularly check out their specific branch, test that, and then make sure that works. The CI portion of this here is, I think somebody just wrote an app that takes the patch, or patches, as they exist, checks out the current, master branch, and then kind of rebases or puts on there, and then has a separate branch, then just kind of
177 00:37:51.170 --> 00:38:05.409 David Christensen: runs and builds on, I think, GitHub's, you know, their GitHub actions to do that. So, that provides CI coverage for the basic test, but also does not have the full, gamut of
178 00:38:05.480 --> 00:38:29.590 David Christensen: possible, combinations. So basically, the CIA validation is kind of a necessary, but not sufficient, you know, has to pass in order to be committed, and then if it's committed, it goes out to the entire, farm to be able to kind of be validated. Sometimes people will look and, you know, something works in 99% of the cases, and on one platform it doesn't work, so it has to
179 00:38:29.590 --> 00:38:31.990 David Christensen: Get revisions or get reverted.
180 00:38:33.570 --> 00:38:45.890 David Christensen: So, if you're wanting to do something, this is my own patch, but I'll pretend that I'm just reviewing this, because it looks like a great patch. You would have a specific
181 00:38:46.270 --> 00:39:06.169 David Christensen: thing, you would download the attachment here, so I will download my group by all for 20. I'm going to copy that over, so, I already have a get source tree here, so I'm gonna go ahead and go into my Postgres source tree.
182 00:39:07.520 --> 00:39:10.650 David Christensen: And I've created a branch just for this.
183 00:39:13.190 --> 00:39:19.109 David Christensen: So this was updated this morning. If I look at the Git logs, this is, you know, from…
184 00:39:20.100 --> 00:39:23.240 David Christensen: 9.14 AM, these are…
185 00:39:23.840 --> 00:39:33.099 David Christensen: you know, what's current until now. So, what I would have to do is, since I've got my patch file here.
186 00:39:39.610 --> 00:39:46.800 David Christensen: And… I'm going to use my Emacs. I'm gonna go ahead and…
187 00:39:48.040 --> 00:40:05.709 David Christensen: apply my patches, so there's my group by all 20, and I'm gonna go ahead and get this going. It looks like there was a merge conflict of some kind, because this is 2 weeks stale, and it told me about that. So, most of the stage changes here, you know, we have…
188 00:40:05.820 --> 00:40:11.260 David Christensen: documentation for the feature. We have, you know, some of the basic
189 00:40:11.420 --> 00:40:18.969 David Christensen: Harnessing, we've got the gram.y, which is kind of the grammar for adding that to the syntax.
190 00:40:19.040 --> 00:40:31.120 David Christensen: we've got any number of other parts here, and then we've got a whole section for regression tests, to kind of add the expected value and the SQL to run with that, so I'll go into that a little more.
191 00:40:31.150 --> 00:40:48.939 David Christensen: In detail, but first, we're gonna get this patch up to date. So, Postgres has, for system catalogs, if you change something about either the system catalogs or about some of the core data structures, you need to modify, the catalog version number, and this was…
192 00:40:48.990 --> 00:40:53.170 David Christensen: Already changed today by somebody else, so I'm gonna increment that.
193 00:40:53.250 --> 00:41:03.130 David Christensen: And… let's see, looks like that is looking good. I'm gonna go ahead and continue. Okay, so I've got my commit that has been…
194 00:41:03.290 --> 00:41:14.230 David Christensen: Re-based here… And… I don't know, can people see… I'm sorry, I forgot to ask you that.
195 00:41:14.230 --> 00:41:15.230 Elizabeth Christensen: Looks great.
196 00:41:16.330 --> 00:41:23.120 David Christensen: Alright, so yeah, this is just, you know, your git commit, with the different pieces.
197 00:41:29.000 --> 00:41:45.810 David Christensen: So, going through the basic syntax that we want to do, we want to add the group by all syntax, which basically is equivalent to writing all the select list entries that do not contain an aggregate function or a window function. And then, here's some examples that we give.
198 00:41:45.810 --> 00:42:06.470 David Christensen: Where we have A, B, A plus B, sum, whatever, and we don't want to have to do the group by for each of these things, where you either have to wrap it in a subquery, or you have to explicitly name the expressions again. It's something that makes it a little less complicated to do, yeah, some of these ad hoc
199 00:42:06.470 --> 00:42:18.380 David Christensen: query. So, that's kind of my basic discussion here. I also want to adjust the documentation for the select statement, because we're changing the syntax for the select. So.
200 00:42:18.380 --> 00:42:38.270 David Christensen: We have the group by all as a standalone piece, and we had documentation for that. These are fairly minimal documentation, changes, which I'm doing, kind of, you know, during the iterative, let's get people on board the feature. Which, surprisingly, this has been a somewhat,
201 00:42:38.270 --> 00:42:43.489 David Christensen: divided, feature. Some people love it, some people hate it, so…
202 00:42:43.490 --> 00:43:07.129 David Christensen: Yeah. Not everybody has to love it, but you need enough people to love it to get it in. But it did get merged once, so I think it should get merged again once the other problems are there. Anyway, yeah, most of what I'm doing here, so the internals are primarily in C, most of what I'm doing is I'm adding an additional flag to a data structure, so was this query a group by all query?
203 00:43:07.130 --> 00:43:31.549 David Christensen: And basically propagating that to the different places that it needs to go. So, when you define the group by all in the grammar, that's an option that just basically we're then passing into what are called nodes. You know, any sufficiently large C project ends up developing its own object-oriented system, and Postgres, you know, is certainly no exception there.
204 00:43:31.630 --> 00:43:41.370 David Christensen: So they have kind of a whole little node system with kind of a generic type, and then data fields end up going here. So this is the part of the,
205 00:43:41.370 --> 00:44:06.080 David Christensen: grammar that I've added for the group by all itself. We just allocate a new group object, and then we set our group by all to true, which is kind of our main thing that we're adding. The rest of it is… is a lot of just boilerplate to get things to kind of get propagated. And then we have to add support for that in the parser, too. So… we do a little bit of refactoring, because the way that group by
206 00:44:06.080 --> 00:44:18.869 David Christensen: works inside Postgres. We use it for a couple of different possibilities. So, the code itself is a little less interesting, and this is not going to be its final state. I've had some feedback of it, but this is the current state.
207 00:44:19.050 --> 00:44:23.149 David Christensen: So we add that there, we transform.
208 00:44:23.150 --> 00:44:42.589 David Christensen: you know, basically pull out and transform the query, so it's a parsed query in the abstract syntax tree, and we basically move the fields that are not already in the group by into the group by, and then let Postgres do it. So that's kind of the basic high-level way of how it works.
209 00:44:42.920 --> 00:44:57.790 David Christensen: So, fairly simple and straightforward, a lot of other kind of boilerplate things to go through this, a lot of, you know, you have to add some things to help with the executor to know what to do, and then we add our… our test files, so…
210 00:44:57.790 --> 00:45:07.810 David Christensen: Postgres itself, the tests are fairly basic. I would say there's, several types of tests. There's regression tests.
211 00:45:07.810 --> 00:45:23.160 David Christensen: which basically take input in the form of SQL, runs it through your version of Postgres that you compile, and then, checks the output and just makes sure that the output is the same, or as expected. So…
212 00:45:23.160 --> 00:45:28.019 David Christensen: In this case, we have the… let me find… okay.
213 00:45:29.040 --> 00:45:31.390 David Christensen: These are the commands that we added.
214 00:45:32.020 --> 00:45:49.549 David Christensen: to the aggregates for doing our group by all section, so we just create a variety of tables. All we're checking is the plans themselves to see what kind of plan it gives, because we want to make sure that the group by plan, you know, provides the right,
215 00:45:49.790 --> 00:46:02.599 David Christensen: plan for… or the right execution for… for these particular queries. So, kind of create some test things. We have any number of query types, so we're testing different things. Okay, we have a…
216 00:46:02.600 --> 00:46:11.720 David Christensen: aggregate and a constant and an expression. We have just a constant, or an expression here. We have multiple things in different orders.
217 00:46:11.720 --> 00:46:22.399 David Christensen: kind of just a variety of, possible test cases here, just as things may work. So, we have all those, and then we have our…
218 00:46:22.430 --> 00:46:32.670 David Christensen: output from Postgres that when we run those, this is the values that we get, so it mirrors the text that you put in, and then it'll show the actual output as well.
219 00:46:33.790 --> 00:46:37.789 David Christensen: So, in this case, we have that most basic…
220 00:46:37.790 --> 00:46:56.530 David Christensen: attempt here are… we're just selecting a column with an aggregate group by all, and it shows us the hash aggregate with the group key, which is what we want to look for, in this case, and that kind of validates that that particular test works. So, for that, you know, 10, 15, 20, set of things, we have
221 00:46:56.640 --> 00:47:14.670 David Christensen: output from those, and that shows us all that. And so, when you run a unit test, when you run the regression test inside Postgres, it basically considers it to be passed if what you run for your test output matches the expected output.
222 00:47:14.730 --> 00:47:34.340 David Christensen: Anything different means that it's, you know, doesn't pass, which means everything has to be completely deterministic in the regression tests. There are certainly, you know, better ways to do tests, but this has the benefit of being fast and being something that can kind of, you know, just be immediately
223 00:47:34.360 --> 00:47:43.610 David Christensen: you know, in the code base, it's completely, consistent. Okay, so we've got our commit in here, kind of showed it off a little bit.
224 00:47:44.010 --> 00:47:48.690 David Christensen: Now, we need to be able to compile it, I am…
225 00:47:48.840 --> 00:48:06.059 David Christensen: Postgres used to use, kind of your AutoConf, you know, your configure, make, make install, kind of thing, and it does support that still, but they've been in the process of converting to Mason. I have a build directory here that's already created,
226 00:48:06.060 --> 00:48:12.160 David Christensen: And I'm gonna use Ninja as the build tool to kind of go and build Postgres in parallel.
227 00:48:12.640 --> 00:48:13.680 David Christensen: So…
228 00:48:15.580 --> 00:48:23.310 David Christensen: It's pretty straightforward, and since I tested this before this call, we're gonna have no issues. It's just gonna go ahead and compile all this stuff for us.
229 00:48:24.050 --> 00:48:48.340 David Christensen: You know, there's the main Postgres server binary, there's a bunch of supporting, binary tools, like the PSQL tool, like any of the PG control, PGWalldump, kind of debugging tools. That all gets done. So, we've built Postgres now, successfully. In order to validate, now, we can do a straightforward validation here, which I will do.
230 00:48:48.950 --> 00:48:58.289 David Christensen: And I'm just going to run the test. So, instead of just doing the build, I'm doing the test by adding that to the Ninja.
231 00:48:59.260 --> 00:49:05.539 David Christensen: And… let's see, it's gonna go ahead and run our test suite, and, you know…
232 00:49:05.640 --> 00:49:20.689 David Christensen: whatever happens, it's gonna run successfully. If something didn't, it would tell us. So this is kind of boring, but something that we want to make sure happens. You can tell that it's fairly fast overall, like…
233 00:49:20.690 --> 00:49:41.749 David Christensen: Especially if you're iterating on a feature that requires, you know, changing a bunch of things, you, you want the compilation, test validation cycle to go pretty quick. That's one of the improvements that moving to Mason is making, is it makes it a little,
234 00:49:41.870 --> 00:49:47.899 David Christensen: a little quicker. I think it's a little better at parallelism than the old make approach was.
235 00:49:48.200 --> 00:49:56.369 David Christensen: So yeah, you can kind of get this stuff tested in, you know, a minute or two, rather than, you know, some major thing, which is nice.
236 00:49:58.420 --> 00:50:23.100 David Christensen: The test suite itself has quite a few extra regressions other than just the basic regression tests, and Postgres itself also has additional testing for, particularly serialization isolation tests, because Postgres is made to be multi-connections, doing multiple things, particularly when you come to locking or making sure things are done in the
237 00:50:23.100 --> 00:50:32.390 David Christensen: order. There's a whole suite of isolation tests that kind of let you define in a meta language,
238 00:50:32.390 --> 00:50:47.899 David Christensen: or I guess a DSL, really. You know, here's multiple sessions that are happening at the same time, let's go ahead and, you know, this thing does this, this thing does this at the same time, and kind of orders the commands in between to kind of deterministically validate some of that.
239 00:50:49.110 --> 00:50:50.260 David Christensen: Okay…
240 00:50:54.020 --> 00:50:58.069 David Christensen: Well, let's let that run. I don't think we need to continue to watch it.
241 00:50:58.680 --> 00:51:07.569 David Christensen: But let's go ahead… I'm gonna show how you can also manually validate your thing. So we have our build directory in here.
242 00:51:08.800 --> 00:51:10.200 David Christensen: And I've…
243 00:51:10.570 --> 00:51:21.099 David Christensen: install, or I built the software, which just leaves it here in this build directory. So, if I look in… I think it's…
244 00:51:23.100 --> 00:51:27.079 David Christensen: Temp install, yeah, user…
245 00:51:28.050 --> 00:51:37.680 David Christensen: it'll kind of stage, as part of the build process, your binary directory, so if I look here, this is, like, the Postgres…
246 00:51:39.770 --> 00:51:53.119 David Christensen: install, this is our latest timestamp, so this VIN directory is… is the VIN for the Postgres version. So let's go ahead, we're gonna look at some of this. So I'm gonna temporarily set my path to that VIN directory.
247 00:52:07.140 --> 00:52:17.720 David Christensen: Okay, so… Okay, so it's pulling it out from the right place, so user local, PGSQL bin, initdb.
248 00:52:17.880 --> 00:52:24.040 David Christensen: So, I'm gonna init DB, and I'm gonna give it a data directory, or demo.
249 00:52:25.160 --> 00:52:36.889 David Christensen: And initdb is the program that you use to kind of set up a Postgres cluster. There's a few things you can pass to it, but for just the purposes of doing some basic testing and validation, this is fine.
250 00:52:43.120 --> 00:52:50.710 David Christensen: Okay, so we can go ahead and… let's go ahead and start our… server?
251 00:52:58.480 --> 00:53:02.040 David Christensen: Alright, yeah, I think I have something running already. Let me…
252 00:53:07.970 --> 00:53:15.769 David Christensen: Okay, so we have gone ahead and started our server. We can look at our log file. Here's our basic…
253 00:53:16.270 --> 00:53:22.700 David Christensen: Logs, ready to accept connections… And…
254 00:53:25.300 --> 00:53:35.650 David Christensen: Gonna go ahead and connect to the Postgres database as myself, just because I didn't configure initdb to have Postgres as the system user, I'm the system user.
255 00:53:36.800 --> 00:53:38.320 David Christensen: I need to tell it.
256 00:53:38.330 --> 00:54:01.210 David Christensen: where the sockets are. Alright, so we have successfully built and are running Postgres 20 development as of my commit. So, the easiest way to validate this here is to go ahead and, create a table to do some tests and just make sure that the feature works how we want. So, let's go ahead and…
257 00:54:01.400 --> 00:54:03.200 David Christensen: I think I had a…
258 00:54:13.200 --> 00:54:20.769 David Christensen: Okay, so I'm gonna create a test table, the primary key, an order date, and a quantity.
259 00:54:21.770 --> 00:54:27.829 David Christensen: I'm gonna go ahead and insert some data into this, and…
260 00:54:32.600 --> 00:54:50.339 David Christensen: Okay, so we can see we've got some data, we've got the primary key, we've got the date, we've got the quantity, these are random values, I just kind of wanted to have some variation in what we were doing. So, if we want to test out our group by all, our basic query is, you know, select…
261 00:54:50.530 --> 00:54:56.430 David Christensen: Let's say we want to find the counts across order date, so we want to have our order date.
262 00:54:56.580 --> 00:54:58.309 David Christensen: And we wanna have…
263 00:54:58.580 --> 00:55:06.150 David Christensen: our count, and we want to have group by all. So, the most basic validation is that the syntax works at all.
264 00:55:07.340 --> 00:55:10.269 David Christensen: Oh yeah, near the table.
265 00:55:11.980 --> 00:55:16.600 David Christensen: Okay, and so it was able to find some things here,
266 00:55:16.940 --> 00:55:30.559 David Christensen: in an ugly order, but that's because it's a hash. So, if we order by order date, that's fine. Alright, so we've got our breakdown of date to count. That's awesome. So…
267 00:55:30.810 --> 00:55:31.800 David Christensen: Let's…
268 00:55:31.990 --> 00:55:41.960 David Christensen: Yeah, I… the only thing, if I wanted to look at the quantities now, without changing anything else in the query… oh, yeah, that's gonna be playing. We'll take that out. Alright.
269 00:55:42.300 --> 00:55:52.280 David Christensen: Anyway, I can do that, and if I want to have quantity and order date, and see how many of each order type were ordered on each day.
270 00:55:52.410 --> 00:55:58.879 David Christensen: I can do that. So, the basic functionality works. I'm able to kind of validate that the syntax is working.
271 00:55:58.890 --> 00:56:18.660 David Christensen: working. This is kind of a toy, example, so not that great. If you're doing a real, you know, analysis of a real database, some of these, functions would be a lot easier. But, so this lets us go ahead and test our local Postgres development there, and since I'm done with that, I'm gonna go ahead and stop it.
272 00:56:20.450 --> 00:56:26.360 David Christensen: And… yeah, that's it. So, I guess that's my demo. I don't know, does anybody have any questions?
273 00:56:31.800 --> 00:56:34.080 David Christensen: I can't hear anything, let's see.
274 00:56:39.650 --> 00:56:43.580 Elizabeth Christensen: There are a couple questions in the chat, David.
275 00:56:43.580 --> 00:56:44.389 David Christensen: Okay, I'm trying to find…
276 00:56:44.390 --> 00:56:48.669 Elizabeth Christensen: Someone asked if you also need order by all, if you do group by all.
277 00:56:49.910 --> 00:57:03.590 David Christensen: That's not something that's supported in this. I don't… I'm not aware of an order by all. It's not necessary that they be the same. You can order by, like, column number in the result set.
278 00:57:03.760 --> 00:57:09.480 David Christensen: I guess that could feasibly be added?
279 00:57:10.680 --> 00:57:16.240 David Christensen: Alright… Let's see, okay…
280 00:57:23.510 --> 00:57:36.889 David Christensen: Amir asked if anyone else was using the CommitFest app, and the answer to that is no. Elizabeth answered, looks like, sorry. Order by all. Okay, any other questions that didn't get answered already?
281 00:57:37.650 --> 00:57:42.110 Gabor Szabo: You had the compilation phase went, like, 15 seconds.
282 00:57:42.490 --> 00:57:48.280 Gabor Szabo: Is that because it compiled so fast, or there are some parts were already compiled?
283 00:57:49.070 --> 00:57:57.980 David Christensen: It's possible that some were already compiled, but it is fairly fast for a fresh, clean, build. That's one of the nice things. I could do a ninja clean.
284 00:57:58.490 --> 00:57:59.719 David Christensen: And then…
285 00:58:01.530 --> 00:58:13.949 David Christensen: Yeah, it's not slow, so it's… it's… yeah, some of it looks like it was cached already. So, only the files that changed with my patch would have been recompiled, which is, I think.
286 00:58:14.380 --> 00:58:17.119 David Christensen: Kind of what you want, really, so…
287 00:58:18.860 --> 00:58:19.880 Gabor Szabo: Yeah, yeah, definitely.
288 00:58:20.920 --> 00:58:21.600 David Christensen: Anyway.
289 00:58:25.600 --> 00:58:26.720 David Christensen: Anyone else?
290 00:58:30.800 --> 00:58:33.050 Gabor Szabo: I was overrun.
291 00:58:33.420 --> 00:58:36.929 Gabor Szabo: By, by, by your presentation, by your part.
292 00:58:40.260 --> 00:58:49.699 Gabor Szabo: Yeah, some people asking for the links, but I think we will share the whole slide, and the slide will have the links, so we will do that, right?
293 00:58:49.850 --> 00:58:52.389 Elizabeth Christensen: They're on… and I can paste some links in now, too.
294 00:58:52.390 --> 00:58:53.459 Gabor Szabo: Yeah, yeah. So definitely.
295 00:58:53.460 --> 00:58:53.900 David Christensen: Arthur.
296 00:58:53.900 --> 00:59:04.920 Gabor Szabo: It will be on, below the video, there will be a link to all the links, or whatever. But you can also paste it here, and I'll collect them and put them on the webpage of the video.
297 00:59:06.710 --> 00:59:27.330 David Christensen: Arthur asks if Postgres is written only in C. Yes, primarily. Little known fact, Postgres used to be written in, Lisp for parts of it very early on, so especially, like, the parser and things like that show kind of some resemblance to that still, even though they've converted to C.
298 00:59:27.430 --> 00:59:32.460 David Christensen: But, there's some tests and things that are written in Perl,
299 00:59:32.730 --> 00:59:44.859 David Christensen: In some of the projects I do, you know, most of the internals are still in C, but then we use, like, Python on PyTech for doing a lot of more complicated testing. So, yeah.
300 00:59:49.050 --> 00:59:53.010 Gabor Szabo: Have you ever had any discussion about, using Rust?
301 00:59:53.950 --> 01:00:00.389 David Christensen: There is a project or two out there for Rust, so Rust can use, you know, the foreign
302 01:00:00.440 --> 01:00:14.149 David Christensen: interface bindings and kind of operate in a C ecosystem fairly well, so there's a couple of crates out there that, kind of expose the Postgres FFI,
303 01:00:14.740 --> 01:00:24.520 David Christensen: I don't think Postgres itself is considering adopting that. I think somebody did do a rewrite, I think they had Claude or somebody do a rewrite in Rust just for clarification.
304 01:00:24.520 --> 01:00:28.599 Elizabeth Christensen: There's actually a couple Rust rewrite projects.
305 01:00:30.760 --> 01:00:44.510 David Christensen: I suspect enough of the community does not know Rust to consider that, but, yeah, it's possible. We have a whole group that's dedicated to trying to move it from a process model to a threads model, which is also a similarly
306 01:00:44.510 --> 01:01:04.249 David Christensen: large, thing. You know, once a project gets to a certain size, you have a lot of inertia, and it's hard to cleanly transition from one thing to another, so Rust is probably along those lines, but… but you can write extensions in Rust, so, that seems to be the easiest way to kind of get in the Rust
307 01:01:04.250 --> 01:01:18.009 David Christensen: infrastructure. PG Parquet is one that, somebody on my team at Snowflake wrote that's written in Rust. So, yeah, you can write it. The core is probably gonna stay C, but I don't think it's…
308 01:01:18.050 --> 01:01:19.899 David Christensen: You know, necessarily bad things, you know?
309 01:01:20.620 --> 01:01:27.549 Gabor Szabo: No, no, definitely not. Just wondering, because so many people… so many people are talking about,
310 01:01:27.750 --> 01:01:30.559 Gabor Szabo: converting this or converting that to Rust.
311 01:01:32.250 --> 01:01:48.349 David Christensen: Yeah, I mean, Postgres is a very conservative project, just in general, so I think, you know, unless there's a real demonstration of the utility of it, converting for the sake of converting to Rust is not high on anyone's list, so…
312 01:01:54.140 --> 01:01:56.210 David Christensen: Alright, well, thanks for your time.
313 01:01:57.410 --> 01:02:02.939 Gabor Szabo: If you have no… no one else has questions, and you don't have anything, as to present?
314 01:02:03.300 --> 01:02:04.120 Gabor Szabo: Dunn.
315 01:02:04.710 --> 01:02:06.899 Gabor Szabo: I would like to say thanks.
316 01:02:08.330 --> 01:02:09.449 Gabor Szabo: To both of you?
317 01:02:09.920 --> 01:02:17.539 Gabor Szabo: And, thanks everyone who was, who was here, and, asked questions, or didn't ask questions, that's also good.
318 01:02:17.920 --> 01:02:26.000 Gabor Szabo: And, thanks everyone for watching, in the YouTube channel. Please don't forget to like the video and
319 01:02:26.200 --> 01:02:32.590 Gabor Szabo: Follow the channel, and then again, below the video, you will find links to the Future events?
320 01:02:33.220 --> 01:02:41.230 Gabor Szabo: And also to the various notes and links about this event, and if you get the slides, then we'll link to that.
321 01:02:41.340 --> 01:02:56.739 Gabor Szabo: there too. And I think that's it for today. Of course, those people who are here in the session, you're welcome to stay after we stop the video recording, and keep conversing.
322 01:02:56.840 --> 01:03:00.490 Gabor Szabo: Elizabeth and David, again, thank you very much.
323 01:03:01.130 --> 01:03:02.150 Gabor Szabo: Goodbye for everyone.