1
00:00:00,001 --> 00:00:06,000
[CLAIRE] Welcome to Talking Postgres. In this podcast, we explore the human side of Postgres, databases

2
00:00:06,000 --> 00:00:13,040
and open source, targeted at the Postgres and application developer communities. Thank you to

3
00:00:13,040 --> 00:00:18,640
the team at Microsoft for sponsoring this community conversation about Postgres. I am the host,

4
00:00:18,640 --> 00:00:25,520
Claire Giordano, and today's topic is helping Rails developers learn Postgres. And our guest

5
00:00:25,520 --> 00:00:32,960
is Andrew Atkinson. So I'm super excited to have Andrew on the show. He is a software developer,

6
00:00:32,960 --> 00:00:39,520
a graduate of University of Minnesota, has worked with Ruby on Rails and Postgres at companies like

7
00:00:39,520 --> 00:00:47,520
Groupon, Microsoft, and a few startups too. He started his own consultancy called Refined Pages

8
00:00:47,520 --> 00:00:53,840
and recently wrote a book that I am holding in my hands right now. The title is High Performance

9
00:00:53,840 --> 00:01:02,560
Postgres for Rails, and you can find out more about it at andyatkinson.com/pgrailsbook,

10
00:01:02,560 --> 00:01:09,440
all one word. So now Andrew gets to add published author to his list of accomplishments. Welcome, Andy.

11
00:01:09,440 --> 00:01:13,680
[ANDREW] Thanks, Claire. Excited to be here. Yeah, thanks for that great intro too.

12
00:01:13,680 --> 00:01:22,320
[CLAIRE] Well, it was easy to put it together. You've done a lot. All right, so let's dive in. Some of our

13
00:01:22,320 --> 00:01:28,240
topics are typically like how I got started as a developer, how I got started in Postgres. But

14
00:01:28,240 --> 00:01:35,520
because of the focus of your book, you and I agreed to really focus this episode on Rails

15
00:01:35,520 --> 00:01:41,680
developers and helping Rails developers learn Postgres. But the book is really,

16
00:01:41,680 --> 00:01:48,720
I don't know, my inspiration for inviting you on the show. I was so excited to see it and to hear

17
00:01:48,720 --> 00:01:55,840
that you were writing it and the reviews have been really, really good. But what I want to do is go

18
00:01:55,840 --> 00:02:02,640
back, back in time and figure out what inspired you. Why did you write a book about this topic?

19
00:02:02,640 --> 00:02:13,360
[ANDREW] Yeah, thanks. Yeah, it's a complicated answer, I guess, because it's a lot of different factors.

20
00:02:13,360 --> 00:02:24,560
But I'd say that I guess one of the big opportunities was I felt like with the

21
00:02:24,560 --> 00:02:29,440
success of a lot of Ruby on Rails apps that are using Postgres as their primary application

22
00:02:29,440 --> 00:02:39,840
database, Ruby on Rails famously or infamously has a built-in object relational mapper that works

23
00:02:39,840 --> 00:02:46,080
great for all sorts of queries, you know, maybe 80% of the kind of queries that an application

24
00:02:46,080 --> 00:02:53,040
might write. But there's an additional set of queries that are going to be challenging to do

25
00:02:53,040 --> 00:03:00,960
with an ORM and developers likely would benefit from knowing how to write, how to identify those

26
00:03:00,960 --> 00:03:05,680
opportunities, whether they're more performance sensitive areas of the application or they're

27
00:03:05,680 --> 00:03:11,200
analytical style queries or that sort of thing. And so developers, I think, have this opportunity

28
00:03:11,200 --> 00:03:17,280
to use SQL directly and write queries. So that's kind of one thing. And I felt like there's not a

29
00:03:17,280 --> 00:03:23,360
lot of, there's kind of a great educational opportunity within the Rails developer world to 

30
00:03:23,360 --> 00:03:30,480
learn to better leverage SQL. So that kind of takes us to like any SQL database though, I mean,

31
00:03:30,480 --> 00:03:36,720
whether you're using Postgres or something else. But then what I found in working with Postgres for

32
00:03:36,720 --> 00:03:41,360
lots of years with different Rails apps was it's a really powerful platform that's both

33
00:03:41,360 --> 00:03:46,400
wide and deep in terms of its capabilities. And there's just all sorts of things that are

34
00:03:46,400 --> 00:03:53,440
not even really visible or possibly on the radar of a typical Ruby on Rails developer.

35
00:03:53,440 --> 00:03:59,360
And I kind of define that by myself, like prior to me learning these characteristics,

36
00:03:59,360 --> 00:04:04,480
but also having worked with lots of teams and probably hundreds of different Rails developers

37
00:04:04,480 --> 00:04:10,400
across teams and companies. So I felt like there are all these capabilities, there's opportunities

38
00:04:10,400 --> 00:04:19,200
to use SQL, but then to sort of like focus on one particular database that is so broad and deep and

39
00:04:19,200 --> 00:04:27,760
also extensible, it kind of got me fired up the opportunity to help developers learn to read,

40
00:04:29,120 --> 00:04:34,560
learn to write SQL, learn to read query execution plans, how to put indexes in place to help their

41
00:04:34,560 --> 00:04:39,360
performance, and then all sorts of additional capabilities we can get into. So I'd say that

42
00:04:39,360 --> 00:04:44,400
was one of the main drivers was I felt like there was a real need and opportunity. And

43
00:04:44,400 --> 00:04:51,440
and then another thing I guess was I just felt like I had a great perspective, like I identified

44
00:04:51,440 --> 00:04:57,120
with the learner possibly more than the Postgres expert, where they might want to know those things

45
00:04:57,120 --> 00:05:01,600
and they might know there are things that Postgres offers that they're not familiar with,

46
00:05:01,600 --> 00:05:06,400
they might not have opportunities to kind of practice using them and develop familiarity and

47
00:05:06,400 --> 00:05:12,640
competency with those capabilities. And so the book is a way to do that too. So what we've done

48
00:05:12,640 --> 00:05:19,120
in the book is we have a lot of, ideally there are examples for every section, but some sections even

49
00:05:19,120 --> 00:05:24,800
go beyond that with exercises. So readers can learn what these things are and really put them

50
00:05:24,800 --> 00:05:29,120
to use hands-on with their local development environment and a local Postgres instance,

51
00:05:29,120 --> 00:05:34,080
so they can kind of learn to use them and then bring those skills into their jobs.

52
00:05:34,080 --> 00:05:42,640
And I guess last thing I'll say on that is I had a great opportunity to use Postgres at a higher

53
00:05:42,640 --> 00:05:48,480
scale where I think you start to, you know, it's common to see more challenges at a higher scale.

54
00:05:48,480 --> 00:05:55,840
And by that I mean, you know, more data. So we're talking into the hundreds of millions of rows or

55
00:05:55,840 --> 00:06:00,640
billions of rows and then higher query volume. We're talking like maybe greater than a thousand

56
00:06:00,640 --> 00:06:05,600
queries per second or transactions per second. At that volume, I think what happens is Postgres

57
00:06:05,600 --> 00:06:11,280
just becomes a little bit more demanding in terms of what's required by the operator to

58
00:06:11,280 --> 00:06:21,440
use it well, like operationally. And a lot of folks I think aspire to have those skills as well,

59
00:06:21,440 --> 00:06:26,400
to know how to use Postgres at higher scale. So I felt like that was the, I had some of that

60
00:06:26,400 --> 00:06:31,360
experience from a past employer and I felt like I could bring that into the book as well. So I could

61
00:06:31,360 --> 00:06:35,600
help show people how to, you know, both learn about new capabilities they might not be familiar

62
00:06:35,600 --> 00:06:42,160
with, but also feel comfortable expanding as their application platform grows and becomes

63
00:06:42,160 --> 00:06:47,200
more successful and their demands, the demands on their database increase.

64
00:06:47,200 --> 00:06:55,360
[CLAIRE] So you talked about the opportunity to help Rails developers better understand

65
00:06:55,360 --> 00:07:03,040
SQL, better understand the underlying database and that you identified with these learners,

66
00:07:03,040 --> 00:07:07,200
right? These Rails developers, and then your experience with these data-intensive,

67
00:07:07,200 --> 00:07:16,400
scalable applications or applications that require massive scalability. But I'm fishing for like,

68
00:07:16,400 --> 00:07:22,000
what inspired you? Because there's probably hundreds, if not thousands of developers in

69
00:07:22,000 --> 00:07:26,160
the world who recognize that opportunity or maybe identified with the learner,

70
00:07:26,160 --> 00:07:31,440
but they didn't go write a book, right? Not everybody will then, like you can see an

71
00:07:31,440 --> 00:07:35,600
opportunity and observe it, but that doesn't mean you're going to do anything about it.

72
00:07:35,600 --> 00:07:41,440
So I guess I'm fishing for, were you standing by the barbecue with your wife and kids and

73
00:07:41,440 --> 00:07:45,760
talking to friends? And then somebody said, well, you should write a book about that. Or,

74
00:07:45,760 --> 00:07:50,080
was there a moment? Why? I mean, does everybody in your family write books or

75
00:07:50,080 --> 00:07:54,480
did you know this from the age of seven? Why did you do this?

76
00:07:54,480 --> 00:07:58,800
[ANDREW] Yeah. I don't really tend to think about it too much, I guess. I just,

77
00:07:59,440 --> 00:08:03,840
but I would say that I can answer some of those latter questions first.

78
00:08:03,840 --> 00:08:06,240
[CLAIRE] Was there a barbecue involved?

79
00:08:06,240 --> 00:08:14,480
[ANDREW] There was no barbecue. I'd say there was one main person who I've credited in the book as well,

80
00:08:14,480 --> 00:08:20,080
Jonathan Genick, for kind of making this possibility even known to me. Because to be

81
00:08:20,080 --> 00:08:23,760
honest with you, I never really thought about writing a book prior to this. And I want to

82
00:08:23,760 --> 00:08:30,400
just lead into that for a moment. But I'd say that for me, no one in my family that I'm aware of

83
00:08:30,400 --> 00:08:39,280
has authored any books. And yeah, I don't really know. I've since come to learn authors and learned

84
00:08:39,280 --> 00:08:43,840
a lot about technical books and through this process, as you might imagine. But I was pretty

85
00:08:43,840 --> 00:08:49,040
naive. I didn't really know much about it and inexperienced with books in general and

86
00:08:49,040 --> 00:08:54,160
publishers and that sort of thing prior to this experience. I guess what I have always done though

87
00:08:54,160 --> 00:08:58,960
is I've always written a blog. And even going back to the 90s, I was thinking about,

88
00:08:58,960 --> 00:09:05,040
as far as my developer origin story, it's not really application code, but I was writing HTML,

89
00:09:05,040 --> 00:09:11,680
you know, creating HTML websites in the early days. And there was something, I guess, really

90
00:09:11,680 --> 00:09:17,520
fundamental maybe about like putting things out into the internet and connecting with people.

91
00:09:17,520 --> 00:09:26,320
That way that's appealed to me even back to those days. And so I remember creating like a

92
00:09:26,320 --> 00:09:31,360
personal web page sometime in the 90s with like HTML for dummies or something like that.

93
00:09:31,360 --> 00:09:36,560
But then I'd say like it took on a little more structure in the 2000s, like writing a tech blog.

94
00:09:36,560 --> 00:09:44,000
And no one really read it. It was really just for me to like, but I kind of have learned about

95
00:09:44,000 --> 00:09:50,160
myself since then that the way I attack topics I want to learn about is I write about them.

96
00:09:50,160 --> 00:09:56,000
So it helps me clarify, you know, kind of clarify what the takeaways are from

97
00:09:56,000 --> 00:10:00,080
something I'm learning about, put it into some sort of structure and that kind of thing.

98
00:10:00,080 --> 00:10:06,400
So I think that the blogging was one of the ways that I caught the attention of

99
00:10:06,400 --> 00:10:13,200
an acquisitions editor at a different publisher that I ended up not working with initially,

100
00:10:13,200 --> 00:10:18,000
or eventually, but initially they reached out to me. So the blogging was part of it. And then I

101
00:10:18,000 --> 00:10:25,440
think the other thing was I presented at Postgres Conference New York City in 2021,

102
00:10:25,440 --> 00:10:32,880
which was my first ever Postgres event of any kind, really. And I took it.

103
00:10:32,880 --> 00:10:35,040
[CLAIRE] OK, so that was just after COVID.

104
00:10:35,040 --> 00:10:36,320
[ANDREW] Yeah, just after COVID.

105
00:10:36,320 --> 00:10:44,000
[CLAIRE] December 2021, if I remember correctly. And that was year one of PGConf New York City,

106
00:10:44,000 --> 00:10:50,320
which is now in its fourth year or something like that. They've already announced the dates for next

107
00:10:50,320 --> 00:10:54,080
year. In fact, that's the one you're talking about, right?

108
00:10:54,080 --> 00:11:00,080
[ANDREW] That's the one. Yeah. Yeah. I had a great time and I recommend that conference to anyone that's

109
00:11:00,080 --> 00:11:03,600
interested in it. I've been back once since I wasn't able to go this year, but

110
00:11:05,520 --> 00:11:09,600
I've been back as an attendee as well, for the record. But that particular time was

111
00:11:09,600 --> 00:11:17,600
I had been using Postgres a ton at work and organized what we had done into initially

112
00:11:17,600 --> 00:11:23,920
an internal presentation. It's a slide deck of 20 or 30 slides to give to management and other

113
00:11:23,920 --> 00:11:28,720
engineering leaders and that sort of thing. Here's a bunch of things we did with Postgres primarily.

114
00:11:28,720 --> 00:11:34,160
And the reason that we did that was we were having a lot of scale and reliability challenges. And

115
00:11:34,800 --> 00:11:41,280
I can get into that more, but we were on, we were kind of what I was describing before,

116
00:11:41,280 --> 00:11:46,880
where we were using Postgres as our primary application database for our Rails backend.

117
00:11:46,880 --> 00:11:53,280
And we had gotten to a point where kind of normal day-to-day things were becoming slow or

118
00:11:53,280 --> 00:11:58,000
problematic, or there were more errors and it just became more demanding of the operator.

119
00:11:58,000 --> 00:12:02,640
And then we'd also vertically scaled the database server to what at the time,

120
00:12:02,640 --> 00:12:07,200
the highest instance available. And so there was a lot of, there was some amount of

121
00:12:07,200 --> 00:12:16,960
panic because we knew that re-architecting or even just some of the performance work that we

122
00:12:16,960 --> 00:12:21,520
did end up doing was going to be demanding, but was going to be necessary for us to continue to

123
00:12:21,520 --> 00:12:28,960
serve the traffic that we were serving at that time. So that was really, I mentioned the blogging.

124
00:12:28,960 --> 00:12:32,880
So that experience, that hands-on experience that I had at the company, I think was another

125
00:12:32,880 --> 00:12:38,960
critical part of me feeling confident enough to try to attack a book like this and feeling like

126
00:12:38,960 --> 00:12:45,600
I had somewhat of a story to tell. And the book itself isn't that story exactly, but it's,

127
00:12:45,600 --> 00:12:53,840
all of the exercises have a connection to my real world experience with whether it's, you know,

128
00:12:54,960 --> 00:13:01,840
kind of the basics of understanding the most costly queries and then optimizing the indexes,

129
00:13:01,840 --> 00:13:06,800
whether it means adding or removing them around those demanding queries, or whether it's using

130
00:13:06,800 --> 00:13:11,760
something like table partitioning and when to use that and what the benefits are. They all relate to

131
00:13:11,760 --> 00:13:20,240
like a real work experience. So I gave that presentation internally and I was kind of,

132
00:13:21,040 --> 00:13:27,760
at the time I was really into the idea of, or at the time I was thinking a lot about,

133
00:13:27,760 --> 00:13:34,240
I'd been working as a software developer for a decade plus at that point. And I was thinking

134
00:13:34,240 --> 00:13:40,000
about kind of voting with my time about how I could work on things that had a little bit

135
00:13:40,000 --> 00:13:45,120
bigger impact even beyond the team or the company I was working for. And I was getting, that was

136
00:13:45,120 --> 00:13:50,560
part of what attracted me to Postgres I would say is, it's, you know, it's been around for decades,

137
00:13:50,560 --> 00:13:56,400
it's used by loads and loads of companies. I felt really good about the quality of the

138
00:13:56,400 --> 00:14:03,120
project, the way it's run and the governance of the project. And I felt like for myself,

139
00:14:03,120 --> 00:14:08,720
it was a great investment of my energy and skills. Like it, I kept being interested in

140
00:14:08,720 --> 00:14:14,480
learning more and more. I bought a Postgres books myself and was found that I enjoyed learning it.

141
00:14:14,480 --> 00:14:19,680
And it was a bit of a surprise. I had the opportunity to apply a lot

142
00:14:19,680 --> 00:14:24,160
of what I was learning, which for me made it more engaging. But I was learning, I was enjoying

143
00:14:24,160 --> 00:14:29,040
learning about it. So I had this idea, what if I apply, what if I submit a proposal to

144
00:14:29,040 --> 00:14:35,760
a Postgres conference? And it was PGConf NYC because it lined up timing wise with

145
00:14:35,760 --> 00:14:40,960
when I was looking to do that. It was in the fall and it was after a bunch of work we had done.

146
00:14:40,960 --> 00:14:49,280
And yeah, I was very fortunate to get that talk accepted. And then I was just kind of prepared

147
00:14:49,840 --> 00:14:59,680
like, you know, the way that I deal with anxiety or worry around preparing for a conference

148
00:14:59,680 --> 00:15:05,040
talk is to just excessively prepare. So I just practiced it a ton and tried to send

149
00:15:05,040 --> 00:15:09,360
it around and get some early feedback and give some early versions and things like that.

150
00:15:09,360 --> 00:15:17,200
[CLAIRE] Well, that's a smart tactic. I mean, anybody up on stage that you

151
00:15:17,200 --> 00:15:22,880
see that makes it look effortless and you know, that it's easy to be envious of, they probably

152
00:15:22,880 --> 00:15:27,920
practiced it a ton to get there.

153
00:15:22,880 --> 00:15:27,920
[ANDREW] Yeah. That's a great point. And I've,

154
00:15:27,920 --> 00:15:32,560
I've developed that mindset too, although sometimes it's not obvious because it's,

155
00:15:32,560 --> 00:15:38,000
I guess it's tempting as a human to just think, Oh, that person, they're just so skilled.

156
00:15:38,000 --> 00:15:43,280
Like I don't have those skills or something. And there is of course, differences in presenter skill,

157
00:15:43,280 --> 00:15:49,600
but there's a lot to be said for preparation. And I know that I try to acknowledge

158
00:15:49,600 --> 00:15:56,080
when I see a great presentation that I remind myself like this person prepared a lot, you know,

159
00:15:56,080 --> 00:15:59,760
it's not just some natural skill that they have granted. They may still have skill, et cetera.

160
00:15:59,760 --> 00:16:06,480
I'm trying not to diminish skill, but but they, they often have prepared a ton and, you know,

161
00:16:06,480 --> 00:16:11,840
that takes a lot of work and it's probably coming from a place of them being proud of their content

162
00:16:11,840 --> 00:16:17,120
and wanting to engage with people and that kind of thing. So, yeah, I was, I've been fortunate to,

163
00:16:17,120 --> 00:16:22,160
you know, another side benefit of that is trying to circulate a presentation like that around and

164
00:16:22,160 --> 00:16:31,200
get feedback is it's a great way to network a bit within the community and meet more people that

165
00:16:31,200 --> 00:16:35,120
might attend the conference or might be interested in attending a future one that's similar or that

166
00:16:35,120 --> 00:16:40,640
sort of thing. So I really appreciated people that helped me out on the preparation side.

167
00:16:40,960 --> 00:16:47,600
So I'll just wrap, I was just going to wrap up that. I realize I've been going on

168
00:16:47,600 --> 00:16:54,560
a lot about that, to wrap up the, if you'd like, I could tie that into the kind of the single moment

169
00:16:54,560 --> 00:17:01,760
thing. I realized I've never really addressed that yet.

170
00:16:54,560 --> 00:17:01,760
[CLAIRE] Let's go. Okay.

171
00:16:54,560 --> 00:17:01,760
[ANDREW] So the PGConf NYC talk

172
00:17:01,760 --> 00:17:11,040
went well. Shortly after that I was, I got an email from a different book publisher and they

173
00:17:11,040 --> 00:17:16,080
said, "Hey, I see you blog about Postgres. I see that you just presented at PGConf NYC. Have you

174
00:17:16,080 --> 00:17:20,640
ever thought about writing a book about Postgres? We're trying to publish more books in that area.

175
00:17:20,640 --> 00:17:25,840
It's a growing, you know, the popularity of Postgres is growing. Our catalog is limited.

176
00:17:25,840 --> 00:17:32,000
We want more books. And that was kind of like a "huh, I never really thought about it

177
00:17:32,000 --> 00:17:39,040
before." And I know people say it's very demanding in terms

178
00:17:39,040 --> 00:17:44,080
of time and it's not particularly lucrative. And I kind of just started researching and

179
00:17:44,080 --> 00:17:49,680
all these things were swirling around, but going back to everything I said, hopefully that

180
00:17:49,680 --> 00:17:57,120
whole thing was, people can sort of connect the dots. It felt like, I started

181
00:17:57,120 --> 00:18:01,600
to think about it and I just kept getting more and more excited about it myself. You know, I felt like

182
00:18:01,600 --> 00:18:07,040
I can bring in my experience. I can identify with the reader. I like to write. I like the

183
00:18:07,040 --> 00:18:12,880
challenge of this whole thing. Like it's one of the things I learned in writing and I'll just stop

184
00:18:12,880 --> 00:18:21,120
there is it like gave me permission in a sense to just read every word of a particular documentation

185
00:18:21,120 --> 00:18:25,840
page that I wouldn't really do otherwise at my full-time job. I'd be trying to just sort of like

186
00:18:25,840 --> 00:18:32,320
find a solution quickly, fix the issue and move on where this, I felt like I, that would

187
00:18:32,320 --> 00:18:38,640
miss the mark totally with a book. Like I need to be very comprehensive and I owe it to the reader

188
00:18:38,640 --> 00:18:45,680
to not miss things, you know? So I was, I kind of liked that challenge in a way, you know, like a

189
00:18:45,680 --> 00:18:51,520
kind of raised the pressure a bit, but like in a positive way, I think that was productive.

190
00:18:51,520 --> 00:18:56,880
I still wanted to synthesize information and provide something useful to the reader, but make

191
00:18:56,880 --> 00:19:04,640
sure that I turned over every stone, so to speak.

192
00:18:56,880 --> 00:19:04,640
[CLAIRE] You know, this is a random segue I'm going

193
00:19:04,640 --> 00:19:08,960
to take you on, but you're making me think about this book called Swimming to Antarctica. Have you

194
00:19:08,960 --> 00:19:14,640
by any chance read it? No. Heard of it? Okay. I should look up what the name of the author is,

195
00:19:14,640 --> 00:19:24,320
but basically there's a woman named Lynne Cox who ended up swimming, like swimming the Bering

196
00:19:24,320 --> 00:19:30,000
Strait, swimming into Antarctica, swimming, being the youngest person to swim the English Channel.

197
00:19:30,000 --> 00:19:33,760
I think when she was like 15 years old or something like that. So she accomplished a

198
00:19:33,760 --> 00:19:39,840
lot of amazing things swimming in these cold water, open water situations. But the way it

199
00:19:39,840 --> 00:19:45,360
all started is she was in a pool, right? On a swim team, like with all her siblings and family in

200
00:19:45,360 --> 00:19:50,640
Southern California or something like that. And there was a storm and everybody else was inside

201
00:19:50,640 --> 00:19:57,200
watching like film of other swimmers because, you know, it was a pretty serious training regime.

202
00:19:57,200 --> 00:20:01,280
And she didn't notice, she was still in the pool, even though there was like this big storm

203
00:20:01,280 --> 00:20:06,000
and the water's kind of sloshing all over the place. And this parent had pulled into the parking

204
00:20:06,000 --> 00:20:11,200
lot, saw her swimming in this storm and said to her later, wow, you know, you should

205
00:20:11,200 --> 00:20:17,920
swim the English Channel someday. And they planted the seed of the idea. So then she went to her

206
00:20:17,920 --> 00:20:22,400
uncle who picked her up that day and was like, Hey, yeah, so-and-so thinks I should swim the

207
00:20:22,400 --> 00:20:26,480
English Channel. "Oh, honey, yeah, you could probably do that." And she told her parents

208
00:20:26,480 --> 00:20:31,280
and they're like, "Oh, yeah, you could probably do that." But it's really fascinating how

209
00:20:31,280 --> 00:20:38,560
sometimes somebody just plants the seed of an idea. And then it takes on a life of its own.

210
00:20:38,560 --> 00:20:41,600
And it sounds like that's kind of sort of what happened with you in this book.

211
00:20:41,600 --> 00:20:50,080
It wasn't the plan. It wasn't the expectation. You didn't even have it in your vision of your future

212
00:20:50,080 --> 00:20:55,920
in your career. And then someone made that suggestion. And now you're a published author.

213
00:20:56,400 --> 00:21:00,640
[ANDREW] Yeah, thank you. Yeah, that makes sense to me. I mean, I think as a parent, I think about that for

214
00:21:00,640 --> 00:21:06,080
my kids to like trying to think about, you know, notice what their interests are and where their

215
00:21:06,080 --> 00:21:10,720
talents might be and just suggest ideas like that. I haven't suggested swimming the English Channel

216
00:21:10,720 --> 00:21:15,280
yet. We haven't been to England, but maybe maybe someday. But maybe for us, it'd be like swimming

217
00:21:15,280 --> 00:21:21,120
across the Mississippi River or something. I live near there. But yeah, it's it's a great point to

218
00:21:21,120 --> 00:21:28,320
try to. And I'd like to think the book can maybe reach some people, even if I never have any direct

219
00:21:28,320 --> 00:21:33,280
interaction with a reader in that way. You know, like they might pick up the book because they're

220
00:21:33,280 --> 00:21:39,360
like, we use Postgres at work and there's some things that are broken and nobody on my team

221
00:21:39,360 --> 00:21:45,200
knows about this. And like, this is something I've seen, I'd say, is, you know, most, a lot of

222
00:21:45,200 --> 00:21:50,880
Rails teams typically don't have database administrators, or I would say even often

223
00:21:50,880 --> 00:21:56,720
people that are experienced with, you know, operating a database, I guess, like beyond

224
00:21:56,720 --> 00:22:01,120
the ORM. And the other thing is, of course, like out in the market, there's lots of different types

225
00:22:01,120 --> 00:22:07,200
of databases. There's NoSQL databases like MongoDB or something. There's, I think there's

226
00:22:07,200 --> 00:22:14,480
sometimes developers have a mindset of, you know, having like database agnosticism and not

227
00:22:15,040 --> 00:22:20,160
leveraging features. And so there's a little bit of kind of like trying to influence

228
00:22:20,160 --> 00:22:25,760
changing that mindset a bit in the book. But yeah, I mean, hopefully, I think early in the book,

229
00:22:25,760 --> 00:22:31,440
you know, there is more of an inspirational emphasis, you know, trying to show like Postgres

230
00:22:31,440 --> 00:22:36,320
is gaining in popularity. This is a practical investment of your time for your career.

231
00:22:36,320 --> 00:22:41,280
Here's why we think why, and that kind of thing. But yeah, hopefully,

232
00:22:41,280 --> 00:22:47,200
there's kind of like someone, something roughly similar to that idea of planting a seed, you know,

233
00:22:47,200 --> 00:22:51,440
that would be great to hear a story like that. I've had a couple readers tell me like, Oh, hey,

234
00:22:51,440 --> 00:22:54,880
I learned something and I put it into use. And it's, you know, that the change I made is in

235
00:22:54,880 --> 00:23:01,280
production now. And that's, that's awesome to hear.

236
00:22:54,880 --> 00:23:01,280
[CLAIRE] So there is a, in the beginning of your book,

237
00:23:01,280 --> 00:23:07,760
you have a couple of quotes, validations, if you will, from people who presumably read early copies

238
00:23:07,760 --> 00:23:13,120
of the book before it went to publication. And there's one from Elizabeth Christensen that says,

239
00:23:13,120 --> 00:23:17,600
"I love that this book lives in two worlds, Rails and Postgres, which are tightly coupled together

240
00:23:17,600 --> 00:23:22,480
when running a production application, but are typically separated in terms of knowledge

241
00:23:22,480 --> 00:23:29,680
communities." So and I think that is kind of what makes your book special. I don't know of any other

242
00:23:29,680 --> 00:23:36,240
Postgres books that are targeted single mindedly at Rails developers, or Rails books that are

243
00:23:36,240 --> 00:23:43,280
targeted only on Postgres. Maybe there are, and I'm just only aware of yours. But, but it made me

244
00:23:43,280 --> 00:23:48,640
wonder, like, is this book for Rails developers? Or is it for Postgres users more generally?

245
00:23:48,640 --> 00:23:56,000
[ANDREW] I'd like to think it's for both. It's primarily written for Rails developers, although

246
00:23:56,000 --> 00:24:02,560
if you look at the, if you breeze through the table of contents, you'll see that

247
00:24:02,560 --> 00:24:08,560
a lot of the chapters somewhat stand on their own as Postgres chapters. The content about Postgres,

248
00:24:08,560 --> 00:24:14,000
it's just that I almost think, you know, we unfortunately we didn't have time to re-title

249
00:24:14,000 --> 00:24:19,440
the book, but I think a better title might have been High Performance Postgres. And then something

250
00:24:19,440 --> 00:24:25,200
like with Ruby on Rails or using Ruby on Rails.

251
00:24:19,440 --> 00:24:25,200
[CLAIRE] And then you could do another one for Python and Django?

252
00:24:25,200 --> 00:24:33,120
[ANDREW] Well, let's, let's talk about that offline.

253
00:24:25,200 --> 00:24:33,120
[CLAIRE] I didn't mean to plant a seed or anything.

254
00:24:33,120 --> 00:24:38,160
[ANDREW] No, I mean, I actually am sort of interested in that. I mean, I've, I recently worked with a

255
00:24:38,160 --> 00:24:43,040
team where we use Django and Python and, you know, it's a great framework. There's a lot

256
00:24:43,040 --> 00:24:49,040
of similarities to Ruby on Rails. Claire, I know you know this because I, what I'm about to say,

257
00:24:49,040 --> 00:24:53,280
because you were involved in the conference as well. But earlier this year, I presented at

258
00:24:53,280 --> 00:24:58,800
the POSETTE conference, the online Postgres conference. And there were, there was also

259
00:24:58,800 --> 00:25:04,240
another presenter who I think has a somewhat similar background to me where a lot of development,

260
00:25:04,240 --> 00:25:08,560
software development in their past. And then, but they work with Python and Django and,

261
00:25:08,560 --> 00:25:17,440
you know, use Postgres. And so I've also, another great technical reviewer and industry

262
00:25:17,440 --> 00:25:23,360
kind of colleague and friend Haki Benita was pointing out to me a lot of similarities.

263
00:25:23,360 --> 00:25:28,800
Like Haki's worked with Django a lot more. I've, I haven't worked with it a ton,

264
00:25:28,800 --> 00:25:35,440
but did use it on a project recently. And Haki was pointing out a lot of similarities. And

265
00:25:35,440 --> 00:25:40,720
I think the frameworks, they sort of influence each other, you know, and there there's other

266
00:25:40,720 --> 00:25:47,360
similar kind of monolithic model view controller oriented frameworks like Laravel and PHP.

267
00:25:47,360 --> 00:25:55,760
For example, it'd be another language framework combo. And I'd love for the book to be considered

268
00:25:55,760 --> 00:26:01,200
by folks in those communities as well. With the idea being like, they'd need to do in a,

269
00:26:01,200 --> 00:26:05,360
you know, they'd be working with a Rails app throughout the book with Postgres, but there'd

270
00:26:05,360 --> 00:26:10,400
be a lot that could be portable to their preferred or their, you know, primary language and framework

271
00:26:10,400 --> 00:26:17,760
stack. So yeah, that for me though, people have asked "oh, why Rails specifically?" And for

272
00:26:17,760 --> 00:26:22,800
me, like one of the main reasons was just the authenticity I could bring with

273
00:26:22,800 --> 00:26:29,920
lots of years and lots of companies using it and seeing some similar, you know,

274
00:26:29,920 --> 00:26:36,320
ideally focusing the book around realistic challenges, you know, something that I might

275
00:26:36,320 --> 00:26:40,640
not get if I was sort of a visitor to the framework and language and didn't have as much

276
00:26:40,640 --> 00:26:45,120
production experience with it, where I might be kind of speculating about some of the issues.

277
00:26:45,120 --> 00:26:52,720
With Rails, I felt like I could, for the application focused portions, I could be very

278
00:26:52,720 --> 00:26:58,400
authentic, like I said, tie things to my specific experience at past companies.

279
00:26:58,400 --> 00:27:05,360
And then the other thing is both Ruby and Postgres are extensible. And so Postgres

280
00:27:06,320 --> 00:27:10,960
of course has hundreds of extensions. I know you also know about that, Claire, as you've presented

281
00:27:10,960 --> 00:27:18,240
on it. And so we bring in about 10, I think there's 10 to 20 Postgres extensions that are

282
00:27:18,240 --> 00:27:24,320
used throughout the book with particular use cases. But then on the Ruby side as well, we've got 10

283
00:27:24,320 --> 00:27:30,720
to 20 Ruby gems that are filling in little gaps here and there or adding functionality beyond what

284
00:27:30,720 --> 00:27:36,320
Rails provides that I think are, you know, genuinely useful. And I wanted people to know

285
00:27:36,320 --> 00:27:40,080
about them and so they could determine if they should include them in their stacks.

286
00:27:40,080 --> 00:27:46,080
[CLAIRE] Well, one thing that's really cool about the book, and I'm not an education expert, and I don't claim

287
00:27:46,080 --> 00:27:52,480
to be, but I've been around the block a few times. And what I've certainly observed is people learn

288
00:27:52,480 --> 00:27:58,160
differently. And that is a fact. And some people learn by doing, right? Experientially, like they

289
00:27:58,160 --> 00:28:04,240
have to have their fingers on the keyboard. They can't just learn by reading a book or having

290
00:28:04,240 --> 00:28:08,240
someone tell them something, because it might go in one ear and out the other. They have to do.

291
00:28:08,240 --> 00:28:15,280
And other people can learn really well by just reading something and their brain processes it,

292
00:28:15,280 --> 00:28:22,800
digests it, and retains it, right? And they kind of just capture it all. And what is really cool

293
00:28:22,800 --> 00:28:29,120
to me about your book is it's useful for both those types of learners. So it's chock full of

294
00:28:29,120 --> 00:28:36,000
not just code samples, but exercises of things you can do, right? You start off giving people

295
00:28:36,000 --> 00:28:41,280
a ride-sharing app and say, "Okay, all the exercises in this book are going to be based on this,

296
00:28:41,280 --> 00:28:47,360
you know, small ride-sharing app." And then, but at the same time, if someone's just going to learn

297
00:28:47,360 --> 00:28:53,520
about the concepts by reading, it's got all that explanation as well. And so I think it's really

298
00:28:53,520 --> 00:28:58,240
cool. I'm not saying it reaches all kinds of learners. Obviously, people who just learn

299
00:28:58,240 --> 00:29:03,280
through like video and watching something, they're not going to benefit from a book as much.

300
00:29:03,280 --> 00:29:08,720
But you definitely are benefiting at least two classes of people.

301
00:29:08,720 --> 00:29:15,520
[ANDREW] Thanks. Yeah. I think, besides video as well, I think that due to my own

302
00:29:16,400 --> 00:29:22,320
lack of skills in the illustration department, and not just like drawing cool things, but I mean

303
00:29:22,320 --> 00:29:27,440
technical illustrations, I'd say like one thing that if we ever do a future version of the book,

304
00:29:27,440 --> 00:29:32,880
I think would be a great improvement would be to add more [diagrams], technical diagrams, you know,

305
00:29:32,880 --> 00:29:37,120
which helps learners as well. And I certainly appreciate them when I read things. I just am

306
00:29:37,120 --> 00:29:41,040
really bad at it. And it just takes a lot. It just takes a lot of time. I don't think I'm bad at it.

307
00:29:41,040 --> 00:29:47,120
It takes a lot of time. And writing a book itself is was for me anyways, was so time intensive.

308
00:29:47,120 --> 00:29:52,720
I just felt like sometimes I just had to I think of certain diagram ideas, but I just

309
00:29:52,720 --> 00:29:57,840
couldn't execute on them with the time constraints, I'd say. So there's not a lot of diagrams in the

310
00:29:57,840 --> 00:30:03,440
book. And I think it would benefit from those. But I think that a lot of times,

311
00:30:03,440 --> 00:30:09,760
if you know, if people are just starting to become familiar with the topic and orient themselves to

312
00:30:09,760 --> 00:30:15,520
it, I think a diagram is helpful. What I found is once I get a mental model of a particular concept,

313
00:30:15,520 --> 00:30:20,640
like let's just say table partitioning, I basically know how it works. Then that's where I think,

314
00:30:20,640 --> 00:30:27,600
you know, on one extreme, I guess if you if you know how it works, and you just kind of want to

315
00:30:27,600 --> 00:30:34,160
know the edges of what's possible, or, you know, that's where I think the Postgres documentation,

316
00:30:34,160 --> 00:30:39,440
it's so excellent that I also couldn't, this book is not intended to be a documentation book.

317
00:30:40,000 --> 00:30:44,560
Because the Postgres documentation is excellent. The Ruby on Rails docs are also great. And they

318
00:30:44,560 --> 00:30:51,120
also have, I'd say a little bit more tutorial style content than the Postgres docs do. There

319
00:30:51,120 --> 00:30:56,800
is some tutorial style content in Postgres, but I'd say the docs are mostly for kind of like API

320
00:30:56,800 --> 00:31:00,480
reference, you know, like what is the, what are the capabilities of this? What are the possible

321
00:31:00,480 --> 00:31:05,680
values? What should I expect as the return and the behavior? So I felt like the book needed to

322
00:31:05,680 --> 00:31:14,160
fit kind of between those two, in a sense, you know, it's not meant to be exhaustive documentation

323
00:31:14,160 --> 00:31:20,880
of every scenario. And it's trying to, to some extent, fill gaps with like, people that are just

324
00:31:20,880 --> 00:31:25,920
starting to become familiar with the topic, or they have some baseline familiarity, but they

325
00:31:25,920 --> 00:31:31,680
want to get some more hands on experience. And then they kind of want to see it in action

326
00:31:31,680 --> 00:31:37,920
in a realistic app scenario, not just a database on its own, but used with an app and

327
00:31:37,920 --> 00:31:43,600
thinking about a user's use case and thinking about even things like growing the popularity

328
00:31:43,600 --> 00:31:47,840
of a platform. And we didn't really get into like making money with the rideshare app, but,

329
00:31:47,840 --> 00:31:52,640
you know, thinking about things like how would we scale if it was a real rideshare app, we'd be

330
00:31:52,640 --> 00:31:58,720
wanting to hire more drivers to fulfill more rides for riders. And we'd be expanding to new cities

331
00:31:58,720 --> 00:32:02,800
and things like that. And then tying that back to data, you know, it's like, okay, well, we're going

332
00:32:02,800 --> 00:32:07,680
to be capturing a lot of data about a lot of rides and a lot of cities. And how would we handle that?

333
00:32:07,680 --> 00:32:14,320
[CLAIRE] So I have to ask you, was it hard to write this book?

334
00:32:14,320 --> 00:32:20,560
That's question number one. And then question number two is start to finish. How long did it

335
00:32:20,560 --> 00:32:26,720
take calendar time? Right? Obviously, I'm assuming you didn't spend every second of every day working

336
00:32:26,720 --> 00:32:37,680
on it. But first, was it hard?

337
00:32:26,720 --> 00:32:37,680
[ANDREW] Yeah, it was. I identify more with the word like demanding

338
00:32:37,680 --> 00:32:43,600
and time intensive. Like I never could have done it wit hout making it a priority in my life.

339
00:32:43,600 --> 00:32:53,920
Like finished it, because it's demanding. I mean, to write, you know, to write a lot,

340
00:32:53,920 --> 00:33:00,320
like each chapter is at 15 to 25 pages, 30 pages, maybe. And there's 15 chapters. And then there's

341
00:33:00,320 --> 00:33:07,200
some reference content as well. Each chapter should really, you know, be cohesive and should be

342
00:33:07,200 --> 00:33:11,680
sequenced appropriately and stuff. There's just lots of kind of technical challenges

343
00:33:11,680 --> 00:33:18,320
in producing a narrative style book that are just going to take a lot of time, even if you're an

344
00:33:18,320 --> 00:33:23,680
experienced author, which I'm not like, and you're efficient at the process. Because I think as a

345
00:33:23,680 --> 00:33:28,560
first time author, too, like I was just, I'll just try that. That worked well, that did not work well,

346
00:33:28,560 --> 00:33:34,000
I'll just try that. It just sort of bumbling into it, basically, as far as like, I'm just going to

347
00:33:34,000 --> 00:33:37,840
write a bunch. I'm going to write things out of order. That's one thing I did, for example,

348
00:33:37,840 --> 00:33:45,920
that turned out to be terrible in terms of efficiency later, because I had to put everything

349
00:33:45,920 --> 00:33:50,400
together into a cohesive narrative that flowed, you know, so you didn't want to talk about a topic

350
00:33:50,400 --> 00:33:54,560
that hadn't been introduced yet. You couldn't talk about something in chapter two that doesn't come

351
00:33:54,560 --> 00:34:01,920
up until chapter 10. So I wrote chapters kind of out of order, where my energy was at the time,

352
00:34:01,920 --> 00:34:08,400
you know, so like if I was using, if I'd been working on some, I just added a GIN index for

353
00:34:08,400 --> 00:34:12,160
something at work, I'd be like, I got to make sure I've got GIN covered well and write about some

354
00:34:12,160 --> 00:34:19,200
scenarios. And so reassembling all that later was really demanding to be, you know, and so like,

355
00:34:19,200 --> 00:34:22,240
if I were to write a book again, I might not do that. And I've gotten some advice from others,

356
00:34:22,240 --> 00:34:27,120
like, oh yeah, don't write out of order, for example. So it was demanding in that sense. And

357
00:34:27,120 --> 00:34:34,320
then for me, I was working full time while I wrote the book. So I had to meet my obligations for my

358
00:34:34,320 --> 00:34:41,760
full time job, you know, which was, you know, roughly 40 hours a week. And in order to have

359
00:34:41,760 --> 00:34:45,760
time for the book, that meant I was usually writing in the evenings. And I happened to be

360
00:34:45,760 --> 00:34:51,040
kind of a night owl, naturally. So it wasn't a big deal, except it was, you know, it can be

361
00:34:51,040 --> 00:34:56,160
disruptive to sleep, because I also want to try to get good sleep. But I'd sometimes be writing from,

362
00:34:56,160 --> 00:35:02,640
you know, eight at night, like we put our kids in to bed, and then I'd be in the office writing

363
00:35:02,640 --> 00:35:08,000
until midnight, or sometimes beyond. And so I'd be trying to cram in as much as I could in the week,

364
00:35:08,000 --> 00:35:13,760
sometimes on the weekend. So given those time constraints, for me, the whole thing start to

365
00:35:13,760 --> 00:35:21,520
finish was a bit over two years. It was about 20, yeah, it was kind of the spring of 2022,

366
00:35:21,520 --> 00:35:26,400
until this summer, the summer of 2024, until everything was all said and done.

367
00:35:26,400 --> 00:35:31,920
Some of that too, was the timeline the publisher is on, which is outside of my control,

368
00:35:31,920 --> 00:35:38,320
the publisher is producing multiple books at once. So they, when certain things need to happen that

369
00:35:38,320 --> 00:35:45,600
are kind of like gate scenarios that need to be gone through, like there needs to be a comprehensive

370
00:35:45,600 --> 00:35:52,240
three chapter technical review, I might get put into a queue with other authors and their books.

371
00:35:52,240 --> 00:35:55,760
And so I would sometimes get a time slot, and they'd be like, okay, well, your your reviews

372
00:35:55,760 --> 00:36:00,560
happening in a month from now. And if I didn't have work to do, that would just be somewhat of

373
00:36:00,560 --> 00:36:03,760
a delay for me, because, you know, I wanted to get it done as soon as possible, of course. But

374
00:36:04,400 --> 00:36:09,520
so yeah, some of that was a little bit on the publisher side, I would say. But yeah,

375
00:36:09,520 --> 00:36:14,960
two years overall is, in talking with other authors is not like a crazy amount of time,

376
00:36:14,960 --> 00:36:21,120
like in the sometimes I've heard of people doing it in, you know, six months to a year timeline

377
00:36:21,120 --> 00:36:25,280
that probably have written books before, but I think two years for a first time author working

378
00:36:25,280 --> 00:36:30,480
full time, it's probably what I would recommend to someone considering it is, can you make a two

379
00:36:30,480 --> 00:36:38,080
year commitment in your life to something?

380
00:36:30,480 --> 00:36:38,080
[CLAIRE] Sure. Well, and I don't expect, well, I could be wrong,

381
00:36:38,080 --> 00:36:44,080
but I don't expect a lot of listeners are thinking about writing books. It's just not something most

382
00:36:44,080 --> 00:36:51,040
of us developer types tackle. But there might be a few, and who knows, maybe your story will

383
00:36:51,040 --> 00:36:57,280
inspire them. The rest of us, especially the Rails developers who are listening will hopefully just

384
00:36:57,280 --> 00:37:04,320
benefit from the learnings and the lessons and kind of all the takeaways of in your book.

385
00:37:04,320 --> 00:37:12,000
But I'm just, I suppose, I'm just really curious about the process that you went through. Because

386
00:37:12,000 --> 00:37:16,240
you have produced this thing that is going to benefit people. And I just want to know how it

387
00:37:16,240 --> 00:37:21,760
happened. So I have one more question about the process before we we dive into things that are

388
00:37:21,760 --> 00:37:26,880
probably more relevant to our listeners, which is did you ever just want to quit? Like even for

389
00:37:26,880 --> 00:37:32,240
a moment or a day or a weekend when you're like, that's it, I'm not going to do this anymore. I'm

390
00:37:32,240 --> 00:37:39,680
not going to write this book. Did that ever happen?

391
00:37:32,240 --> 00:37:39,680
[ANDREW] You know, honestly, it didn't for me.

392
00:37:39,680 --> 00:37:49,120
I think that I, for me, what happened more was like an impatience of really just wanting to

393
00:37:49,840 --> 00:37:57,200
get it out, but also recognizing like it needed to be high quality. And I was to some extent staking

394
00:37:57,200 --> 00:38:02,640
my professional reputation on this too. Like if the book was poorly edited or, you know,

395
00:38:02,640 --> 00:38:08,880
content was poor, inaccurate, that wouldn't be, that would be bad for my career, right? Like I

396
00:38:08,880 --> 00:38:13,360
want to work with Postgres at companies and I want companies to, you know, understand that I

397
00:38:14,560 --> 00:38:23,040
can do a good job. And, but yeah, I guess like it, I think like one of the main practical

398
00:38:23,040 --> 00:38:26,320
challenges, to be honest with you, was just making the time available in the family and

399
00:38:26,320 --> 00:38:30,880
that kind of thing. And I'd say that like, it's, it is really hard for anyone that is considering

400
00:38:30,880 --> 00:38:35,840
writing a book, like, you know, it's challenging to work out with your family, you know,

401
00:38:35,840 --> 00:38:40,160
making sure that you can meet your obligations. And I would say I've made a lot of, I would

402
00:38:40,160 --> 00:38:45,360
made some personal sacrifices too. Like I, some of them were not healthy, like, you know,

403
00:38:45,360 --> 00:38:51,360
worse eating and exercise habits and socializing habits, just simply from time constraints in the

404
00:38:51,360 --> 00:38:56,800
day, you know, like I'm working full time, I've got kids and to make the time available.

405
00:38:56,800 --> 00:39:05,840
So I think, I think like I got, you know, and I think the Pragmatic Programmers structure 

406
00:39:06,640 --> 00:39:12,720
probably helped me avoid that scenario. I'm sure that they really don't want authors to reach a

407
00:39:12,720 --> 00:39:20,160
point where they're demotivated to the point where they, it would be best to stop, you know,

408
00:39:20,160 --> 00:39:26,720
it would be like a disappointment for lots of folks. And I think that they do a good job of

409
00:39:26,720 --> 00:39:32,640
using a structured process of approaching the book, starting from the beginning with

410
00:39:33,760 --> 00:39:37,520
really like a lot of emphasis on an outlining process that they call story maps,

411
00:39:37,520 --> 00:39:44,480
and helping you form what they call the hero's journey, which in this case, the reader is the

412
00:39:44,480 --> 00:39:49,280
hero, and they're going on like a journey of learning some technical skills. They do a good

413
00:39:49,280 --> 00:39:55,920
job, I think of kind of keeping the author engaged in the learners goals and motivation throughout

414
00:39:55,920 --> 00:40:01,360
the process to help avoid, I think, I think it genuinely does help avoid that problem of like,

415
00:40:01,360 --> 00:40:07,840
oh man, this is so demanding. Like I'm, you know, not able to meet my commitments.

416
00:40:07,840 --> 00:40:13,360
Maybe I should just stop. So I think that got me through the hump, you know, like we had

417
00:40:13,360 --> 00:40:20,480
within the first, I don't remember if there was a simple calculation, like one chapter a month

418
00:40:20,480 --> 00:40:24,880
or something. I mean, that might be a nice cadence to get through at least a rough draft of a chapter.

419
00:40:24,880 --> 00:40:31,120
But like, maybe six months in, like, I just felt like there was enough of a kernel of the book

420
00:40:31,120 --> 00:40:37,600
that I was, it was re-energizing myself, you know, I'm like, this is, this is going to be useful.

421
00:40:37,600 --> 00:40:43,360
I kind of got more excited about it myself. And then it was like a virtuous cycle of

422
00:40:43,360 --> 00:40:48,720
making me want to continue. So beyond that point, I would say, it was more just about trying to

423
00:40:48,720 --> 00:40:57,040
manage my work life, manage my home life, and just try to get it done. Yeah.

424
00:40:48,720 --> 00:40:57,040
[CLAIRE] And you got there.

425
00:40:57,840 --> 00:41:03,520
[Yeah.] Did you, did you throw a big party? 

426
00:41:03,520 --> 00:41:08,880
[ANDREW] I was thinking about it. I never really, what's weird is that, no, I didn't.

427
00:41:03,520 --> 00:41:08,880
[CLAIRE] Okay, well, you should, you should throw a barbecue.

428
00:41:08,880 --> 00:41:13,520
[ANDREW] Yeah. I mean, like my immediate family, of course knows a lot about it and

429
00:41:13,520 --> 00:41:19,440
they're excited for me. And people professionally that are friends that they're excited for me,

430
00:41:19,440 --> 00:41:24,400
you know, they know it's like a challenging endeavor. And, but then it's funny because

431
00:41:24,400 --> 00:41:28,480
like my, the actual people I associate with on a day to day basis, like my neighbors and like,

432
00:41:28,480 --> 00:41:33,200
I work remotely too. So I mostly just like see my neighbors and other parents at the bus stop.

433
00:41:33,200 --> 00:41:36,160
They're like, Oh, you wrote a book. Cool. And that's, that's about the extent of the

434
00:41:36,160 --> 00:41:39,680
conversation, you know, if I'm being honest. So it's, it would be a little bit like,

435
00:41:39,680 --> 00:41:44,080
who would I invite? You know what I mean?

436
00:41:39,680 --> 00:41:44,080
[CLAIRE] I know. It's amazing that we have

437
00:41:44,080 --> 00:41:48,560
people in our lives who just don't understand our work. I was on a walk with a friend last night

438
00:41:48,560 --> 00:41:53,440
and she was like, Oh, how was Seattle last week? And you and I were both in Seattle together at

439
00:41:53,440 --> 00:42:00,320
the PASS Data Summit. And, you know, I gave a talk in the afternoon on Wednesday, but I also

440
00:42:00,320 --> 00:42:06,080
gave a five minute demo about Azure Database for PostgreSQL in the morning. And it was in front of

441
00:42:06,080 --> 00:42:13,040
like 1700 people. So it was kind of a big deal. Like my face was larger than life on these massive

442
00:42:13,040 --> 00:42:17,680
screens. And in fact, they, you know, even had hair and makeup on everybody involved in the

443
00:42:17,680 --> 00:42:23,520
keynote and, you know, before that. And I, you know, I was telling my friend about it,

444
00:42:23,520 --> 00:42:28,880
but it was a really big deal, but I don't think she got it. You know, it's like, "Oh, 1700 people,

445
00:42:28,880 --> 00:42:36,240
that sounds like a lot." The situation doesn't come across with the

446
00:42:36,240 --> 00:42:40,000
words. I don't know.

447
00:42:36,240 --> 00:42:40,000
[ANDREW] Right. And it's not, and it's not to say I don't want to,

448
00:42:40,000 --> 00:42:45,200
none of my neighbors would be listening to this anyway, but like the, I mean, it's not that I

449
00:42:45,200 --> 00:42:50,160
don't appreciate their sincerity and their sincere, like people are, they, they know just

450
00:42:50,160 --> 00:42:54,240
generally writing a book is going to be time consuming and stuff. So they're supportive

451
00:42:54,240 --> 00:42:58,000
and that kind of thing. But I think it's kind of the, it's mainly the divide between

452
00:42:58,000 --> 00:43:03,280
the technology world for people that aren't in the technology world, you know, they're not,

453
00:43:03,280 --> 00:43:08,720
they just don't have like mental models for like what software development is and what databases

454
00:43:08,720 --> 00:43:13,600
are and stuff. So it's, you know, I think for my neighbors that are not in the

455
00:43:13,600 --> 00:43:19,200
it or software world, you know, I wouldn't expect them to know anything about it and stuff.

456
00:43:19,200 --> 00:43:24,960
So it's totally fine to just have like a kind of like a, or I mean, I still appreciate

457
00:43:24,960 --> 00:43:30,080
that they would recognize that and be excited about it in terms of like having a party though.

458
00:43:30,080 --> 00:43:34,960
It felt, yeah, I mean, maybe just like [you should throw a book party. You gotta do it.]

459
00:43:34,960 --> 00:43:40,880
Yeah, I mean, I definitely, my wife is my biggest supporter and I think like

460
00:43:41,600 --> 00:43:49,360
we've, she's been really excited for me to finish it up. And, you know, like

461
00:43:49,360 --> 00:43:53,600
we just have like a little mini celebrations maybe if we're on like a vacation with our family or

462
00:43:53,600 --> 00:43:58,160
something like that. One more quick thing to say though, I guess is I would say like with,

463
00:43:58,160 --> 00:44:02,800
for just the way my brain works, it just, it makes sense to be like,

464
00:44:02,800 --> 00:44:10,960
maybe with the Rails community, as far as the most kind of the audience where the book would be

465
00:44:10,960 --> 00:44:15,360
the most relevant for maybe in terms of like celebrating it or whatever. And I did want to

466
00:44:15,360 --> 00:44:23,840
briefly mention that I had the chance to go to Rails World, in September in Toronto and,

467
00:44:23,840 --> 00:44:27,440
had a great experience there where I was able to, I gave out a bunch of copies of the book

468
00:44:27,440 --> 00:44:34,800
and had a little mini book signing event and the Rails World organizers helped

469
00:44:34,800 --> 00:44:38,640
organize that for me, even though I wasn't like a sponsor or anything, which was great.

470
00:44:39,360 --> 00:44:44,960
And another author was there as well, Vladimir Dementyev. And so we got to meet some

471
00:44:44,960 --> 00:44:49,440
Rails developers and some readers, which included people that had read the book, but also a lot of

472
00:44:49,440 --> 00:44:52,640
people that had not heard of it or anything like that, which was great. Cause then I got to kind

473
00:44:52,640 --> 00:44:56,800
of do a little mini pitch on it and that kind of thing. So in a sense, like that was, that was a

474
00:44:56,800 --> 00:45:01,440
bit of a celebration for me. I was kind of like, it was the first bigger Rails

475
00:45:01,440 --> 00:45:07,280
event I would say I was at since the book was fully done and, you know, on online to be purchased and

476
00:45:07,280 --> 00:45:14,640
whatnot. So that was a, for me, that was like a celebration.

477
00:45:07,280 --> 00:45:14,640
[CLAIRE] Yeah. That sounds like a good

478
00:45:14,640 --> 00:45:20,240
celebration. Are there, are there Rails, Ruby on Rails, user groups, the way there are a Postgres

479
00:45:20,240 --> 00:45:27,520
user groups and all other sorts of kinds of user groups. I wonder if that's another way to

480
00:45:27,520 --> 00:45:33,440
not just spread the word, but also have all these little parties.

481
00:45:33,440 --> 00:45:39,920
[ANDREW] Yeah, for sure. Yeah. I think that that little, the little parties concept is, is probably more kind of where I'm

482
00:45:39,920 --> 00:45:44,800
trying to go with this, I guess. And the meetup groups, there used to be one here where I live in

483
00:45:44,800 --> 00:45:52,160
Minneapolis, that is kind of has kind of unfortunately died. I think it's still sort of

484
00:45:52,160 --> 00:45:57,200
exists online, but I don't think that they're active in meeting up anymore. But what I have

485
00:45:57,200 --> 00:46:02,800
seen a lot of is regional conferences that might be, that might attract on the realm of a few

486
00:46:02,800 --> 00:46:06,960
hundred people. And I did get a chance to go to a couple of this year as well. I went out to

487
00:46:06,960 --> 00:46:12,320
Las Vegas for Sin City Ruby back in the Spring and presented there. And a lot of those folks are

488
00:46:12,320 --> 00:46:18,400
using Rails in their job and some of them are using Postgres and gave a presentation on

489
00:46:18,400 --> 00:46:24,000
query performance and both inside and outside of Active Record and that kind of thing, which is

490
00:46:24,000 --> 00:46:31,920
the ORM. And so that was great. And, you know, recently I know of like a Rocky Mountain Ruby

491
00:46:31,920 --> 00:46:38,240
out in the, I think that was in Boulder, Colorado. And then currently RubyConf Chicago is happening.

492
00:46:38,240 --> 00:46:41,360
And I just saw this morning, there's like 600 people there, which is pretty cool,

493
00:46:41,360 --> 00:46:47,120
including first time attendees and folks newer to the Ruby language and community.

494
00:46:47,120 --> 00:46:52,000
So there's definitely a lot of, kind of regional events and smaller events.

495
00:46:52,000 --> 00:46:58,160
[CLAIRE] And yeah, I just dropped a link into the chat of all these Ruby conferences that are happening

496
00:46:58,160 --> 00:47:05,280
worldwide all over the place. In fact, there's something happening in Indianapolis today,

497
00:47:05,280 --> 00:47:11,600
a monthly meetup. So it's, yeah, I guess there is a lot you've got, you've the world is

498
00:47:11,600 --> 00:47:17,600
your oyster there, Andrew, a lot of places you can go make sure people benefit from this book.

499
00:47:17,600 --> 00:47:21,920
But you said something a minute ago, I just have to disagree with, and you were talking about,

500
00:47:21,920 --> 00:47:27,120
and I may get your words wrong, but the divide between the technology and the non-technology

501
00:47:27,120 --> 00:47:33,760
worlds. And, I actually think when it comes to like empathizing with a friend or a neighbor

502
00:47:33,760 --> 00:47:39,680
or somebody, I think it's just hard to understand anybody else's worlds. Like a friend of mine is a

503
00:47:39,680 --> 00:47:45,920
neurosurgeon. He might have a really bad day at the hospital and I would never understand what

504
00:47:45,920 --> 00:47:52,800
it's like to be, you know, in a surgery for 13 hours trying to save somebody. I just have

505
00:47:52,800 --> 00:48:00,400
zero understanding of what his day to day is like. And, the same is true for almost any other

506
00:48:00,400 --> 00:48:07,280
profession. So the world I understand is tech, right. And right now, Postgres, and,

507
00:48:07,280 --> 00:48:14,240
I think we can try and we can try to have empathy, but sometimes if you've never been in the room,

508
00:48:14,240 --> 00:48:21,280
it's just your imagination, right?

509
00:48:14,240 --> 00:48:21,280
[ANDREW] Right. Yeah. My, my wife is a physician and not in

510
00:48:21,280 --> 00:48:28,000
tech and what she does with her patients, I can't really

511
00:48:28,000 --> 00:48:33,440
understand. I don't have the training background and it's not really in my

512
00:48:33,440 --> 00:48:38,080
interest area and stuff. So I usually, I'm trying to ask her, you know, what her

513
00:48:38,080 --> 00:48:44,160
individual experiences were and, you know, as kind of like a API in a sense, like to understand

514
00:48:44,960 --> 00:48:54,000
how it impacts her and whether I can, kind of my role in the conversation,

515
00:48:54,000 --> 00:48:58,880
like being supportive of what her experiences are and stuff like that. So, I mean,

516
00:48:58,880 --> 00:49:03,280
I'll have some neighbors and non-tech folks like ask about what's it like to work with a publisher

517
00:49:03,280 --> 00:49:08,560
and, you know, things that like would be more like touch points for non-tech people or non-tech book

518
00:49:08,560 --> 00:49:12,880
authors or that kind of thing. On the other hand too, another thing that's been cool is I have

519
00:49:12,880 --> 00:49:17,920
met a number of tech book authors and it's been really cool to learn what their experiences

520
00:49:17,920 --> 00:49:21,440
are. I would ask some of the same questions, what's it like to work with that publisher?

521
00:49:21,440 --> 00:49:26,640
What's the process like? What's the promotional experience like? What, you know, what are they,

522
00:49:26,640 --> 00:49:30,640
how do they kind of help you out with like getting the word out about the book, things like that.

523
00:49:30,640 --> 00:49:36,880
[CLAIRE] Now there's something you said earlier in this call that I think is relevant to so many

524
00:49:37,840 --> 00:49:44,080
listeners, which is you talked about how long before the idea for writing a book was even in

525
00:49:44,080 --> 00:49:50,880
your mind, right? You were a blogger, right? You would share your learnings or your insights online

526
00:49:50,880 --> 00:49:56,160
and put it out there. And I think what's so cool, like as you were talking about that,

527
00:49:56,160 --> 00:50:02,000
as you were talking about how when you write something down it, well, you didn't use these

528
00:50:02,000 --> 00:50:07,440
words exactly, but like I felt like you were talking about how it strengthened your understanding,

529
00:50:07,440 --> 00:50:13,040
right? It reminded me of this quote by David McCullough that I absolutely love, which is

530
00:50:13,040 --> 00:50:18,480
"Writing is thinking. To write well is to think clearly. That's why it's so hard."

531
00:50:18,480 --> 00:50:27,040
But I guess I'm wired the same way. Like for me, if I want to understand something, or even if I

532
00:50:27,040 --> 00:50:32,320
want to really remember something, I've got to write it. I've got to explore it with my fingers

533
00:50:32,320 --> 00:50:42,320
on the keyboard. And I think that, well, it's a gift actually. For those people who are

534
00:50:42,320 --> 00:50:47,280
drawn to writing, it does strengthen their analytical thought process, which I think is

535
00:50:47,280 --> 00:50:53,440
pretty cool. And I suppose coding. Coding is just another kind of writing, right? Being a developer,

536
00:50:53,440 --> 00:50:57,520
yeah, you're writing in a particular syntax, but it's still writing.

537
00:50:57,520 --> 00:51:00,880
[ANDREW] Yeah, I do think that they're pretty similar. I mean,

538
00:51:00,880 --> 00:51:09,040
it probably wouldn't surprise you that when it comes to software development, I'm pretty

539
00:51:09,040 --> 00:51:14,800
interested in the design, maybe more design up front than some developers might be. Because I

540
00:51:14,800 --> 00:51:19,920
want to understand what are the requirements and the limitations, what do we want to have at the

541
00:51:19,920 --> 00:51:26,400
end of this thing, and then work backwards from there on some of the build details. What's the

542
00:51:26,400 --> 00:51:30,400
data model going to look like? What are the models? What are the API endpoints and that sort of thing.

543
00:51:30,400 --> 00:51:44,640
And yeah, I do think writing is, I do feel privileged to, like I tend to try to look at

544
00:51:44,640 --> 00:51:53,360
it as a strength that there's, it is true in my career experience anyway that a lot of developers,

545
00:51:54,560 --> 00:52:02,400
most developers I don't think write at least publicly, based on my individual experience

546
00:52:02,400 --> 00:52:08,000
anyways, just asking folks, finding out. Or they're really good at hiding their blogs on

547
00:52:08,000 --> 00:52:12,800
the internet or something like that. But most people don't write publicly anyways. They may

548
00:52:12,800 --> 00:52:22,080
write privately, and that's great. And then a lot of folks too, I think with, especially with the

549
00:52:22,080 --> 00:52:28,480
COVID pandemic and a lot of folks switching to working remotely, there was maybe a degree of

550
00:52:28,480 --> 00:52:33,920
more forced writing in the workplace setting. Being able to share things in written form,

551
00:52:33,920 --> 00:52:37,440
like whether it's on an internal Notion page or something like that with your teammates.

552
00:52:37,440 --> 00:52:42,640
It became to some extent like a replacement for some meetings and that kind of thing that

553
00:52:42,640 --> 00:52:46,400
might not have happened otherwise. So I think there was some more writing. And

554
00:52:46,400 --> 00:52:50,720
I've actually worked remotely for a really long time, more than a decade at lots of different

555
00:52:50,720 --> 00:52:57,040
companies. So I've tried to leverage writing in my jobs as well, like where there are opportunities to

556
00:52:57,040 --> 00:53:03,280
document behavior or even just simple things like taking meeting notes in a meeting.

557
00:53:03,280 --> 00:53:10,880
And yeah, I think it keeps, writing always kind of keeps me more engaged.

558
00:53:10,880 --> 00:53:19,520
It kind of forces some structure. And so in a way, writing the book did feel like an

559
00:53:19,520 --> 00:53:27,360
extension of that. Like writing a blog post, but in a lot greater detail and breadth.

560
00:53:27,360 --> 00:53:31,280
But of course, it also had its own unique challenges too with

561
00:53:31,280 --> 00:53:39,120
some of the things specific to a book that would be beyond what, I mean, a blog post,

562
00:53:39,120 --> 00:53:44,560
I generally don't have a reader for. I'm just sort of writing things to my interest level and

563
00:53:44,560 --> 00:53:49,920
publishing it. But with a book, I really liked the challenge involved with

564
00:53:49,920 --> 00:53:58,560
having readers, early readers of the book. In the beginning of the book, we have an

565
00:53:58,560 --> 00:54:04,320
acknowledgment section. We had like more than 10 people, I think almost close to 20.

566
00:54:04,320 --> 00:54:09,840
[CLAIRE] There are some awesome people that you acknowledge as your reviewers of this book.

567
00:54:09,840 --> 00:54:10,320
[ANDREW] Yeah, I agree.

568
00:54:10,320 --> 00:54:11,680
[CLAIRE] I mean, people I admire.

569
00:54:12,320 --> 00:54:18,000
[ANDREW] Yeah, me too. I mean, it was a real privilege. Really, honestly, everyone, every single person

570
00:54:18,000 --> 00:54:23,600
that is mentioned, I am in debt to. I really appreciate it. Because generally, they're

571
00:54:23,600 --> 00:54:28,240
doing it, they're volunteering their time. And they get, all they really get is they get

572
00:54:28,240 --> 00:54:33,920
a mention and they do get a copy of the book. But that in no way compensates for the care

573
00:54:33,920 --> 00:54:38,560
level that they put into it and that sort of thing. And really, the success of the book

574
00:54:40,640 --> 00:54:45,760
needs to be shared with them too. And I hope all of, I try to kind of ping people periodically.

575
00:54:45,760 --> 00:54:54,400
But I really do genuinely care a lot about, I'm deeply appreciative of the work that

576
00:54:54,400 --> 00:54:59,280
the reviewers put in. Because they were the early readers and they have expertise areas and they

577
00:54:59,280 --> 00:55:03,520
provided feedback. This doesn't really make sense or this could be better, etc., whatever.

578
00:55:04,160 --> 00:55:11,200
And it's really critical, I think, to making a book that is intended for people to read and to

579
00:55:11,200 --> 00:55:17,040
work through those issues. It's really similar in a way to releasing the first version of software

580
00:55:17,040 --> 00:55:21,200
and just having different bugs. Because you didn't have different types of users using it

581
00:55:21,200 --> 00:55:26,800
and different ways and different clients and things like that. And you're probably not going

582
00:55:26,800 --> 00:55:32,080
to get all the bugs right away. So you got to kind of validate the new software with real usage

583
00:55:32,080 --> 00:55:37,360
experience and fix some issues, smooth out some issues. And I would say writing was like that too.

584
00:55:37,360 --> 00:55:41,520
So those early readers were critical and I really appreciate all of their work.

585
00:55:41,520 --> 00:55:48,160
[CLAIRE] Well, here's something else. I don't know if you're going to agree or disagree with this, but

586
00:55:48,160 --> 00:55:53,040
you were talking about how awesome the Postgres open source documentation is.

587
00:55:53,040 --> 00:55:57,600
And I dropped a link into the show notes, into the Discord for that. And I completely agree.

588
00:55:57,600 --> 00:56:04,400
It is awesome. But when I think about when the vast majority of users of Postgres

589
00:56:04,400 --> 00:56:12,640
are probably consuming Postgres either through a managed service provider, right, in the cloud,

590
00:56:12,640 --> 00:56:19,600
and they're probably an application developer. So they're not necessarily an expert in Postgres,

591
00:56:19,600 --> 00:56:25,600
right? They might be looking at the managed service providers documentation first and foremost,

592
00:56:25,600 --> 00:56:30,720
and they might be using Postgres, you know, as a Ruby developer through an ORM.

593
00:56:30,720 --> 00:56:38,880
And so I think that's another thing that's so cool about this book, right? Is it's going to

594
00:56:38,880 --> 00:56:44,320
benefit a lot of users who might not be going and looking directly at the Postgres documentation

595
00:56:44,320 --> 00:56:51,440
every day, right? Who have a couple, they're a little bit further up the stack, if that makes

596
00:56:51,440 --> 00:56:58,880
sense. Do you agree or disagree?

597
00:56:51,440 --> 00:56:58,880
[ANDREW] I totally agree. I mean, I don't know. I mean, at least in my world,

598
00:56:58,880 --> 00:57:05,120
everyone uses Postgres that way. It's, while it might be like a critical, I mean, it is a critical

599
00:57:05,120 --> 00:57:11,680
part of their deployment. It's, you know, besides it's kind of a server software, the client

600
00:57:11,680 --> 00:57:17,040
application is like a Rails app in this case, it could be Django or something else. But, and so

601
00:57:17,040 --> 00:57:23,200
they're mostly interacting with Postgres via the ORM layer, then their model layer. And there's

602
00:57:23,200 --> 00:57:28,960
this whole, you know, there's this whole concept of the object relational divide, where you have

603
00:57:28,960 --> 00:57:34,960
your kind of object, at least in an object oriented programming language like Ruby or Python,

604
00:57:34,960 --> 00:57:41,120
you have objects and that's what you know, as a developer, you know, you have your, like in the

605
00:57:41,120 --> 00:57:45,520
case of rideshare, we have trips and trip requests and drivers and trip positions and things like

606
00:57:45,520 --> 00:57:50,640
that. And then you have your relational database, which has of course, tables and rows and indexes

607
00:57:50,640 --> 00:57:58,240
and joins and there's like Elizabeth Christensen said, there's kind of like two

608
00:57:58,240 --> 00:58:05,920
different worlds a bit, and they have kind of unique non-overlapping language or non-overlapping

609
00:58:05,920 --> 00:58:11,680
learning resources. And the interesting part to me at a higher level of scale too, is that

610
00:58:12,720 --> 00:58:19,440
it's really that interaction that is the, becomes more critical, you know, like using,

611
00:58:19,440 --> 00:58:24,880
you know, ultimately the database is providing the applications,

612
00:58:24,880 --> 00:58:29,440
satisfying the applications query workload, whether it's write and read operations,

613
00:58:29,440 --> 00:58:37,920
reading and writing data. And a lot of performance comes down to efficiency and

614
00:58:39,600 --> 00:58:47,040
achieving higher amounts of scale through greater efficiency. And the way that I've found to drive

615
00:58:47,040 --> 00:58:53,440
efficiency is to have a real deep understanding of the query workload execution and where we can

616
00:58:53,440 --> 00:58:59,920
make changes to improve efficiency. So, you know, an easy example is just introducing an index

617
00:58:59,920 --> 00:59:05,120
where it would be beneficial for a query that is not currently supported by an index,

618
00:59:05,120 --> 00:59:10,320
but that sort of idea, we have an application that's kind of what all

619
00:59:10,320 --> 00:59:15,840
the developers know. That's what our users of the application interact with. We got Postgres

620
00:59:15,840 --> 00:59:21,280
behind the scenes here, but it actually can be a huge driver of the ability for the platform to

621
00:59:21,280 --> 00:59:28,160
scale, to be reliable. And of course, it's storing the super valuable asset of the data for

622
00:59:28,160 --> 00:59:33,280
the platform. And that needs to be done like safely. We don't want, of course, any data

623
00:59:33,280 --> 00:59:39,920
loss. We want to have referential integrity between our relations and that kind of thing.

624
00:59:39,920 --> 00:59:47,760
So I think, going back to something you said earlier too, Claire,

625
00:59:47,760 --> 00:59:52,000
I felt like I had purchased some database books, but they generally are written with

626
00:59:52,000 --> 00:59:58,480
almost like there is, well, the ones that I've read anyways, they're more focused on the

627
00:59:59,520 --> 01:00:05,280
day-to-day of a database administrator performing some critical functions, but probably in a self

628
01:00:05,280 --> 01:00:11,200
hosted Postgres context, making sure that data is backed up, making sure that data can

629
01:00:11,200 --> 01:00:16,480
be restored if needed, things like that, that are critical, that in a lot of cloud hosting contexts

630
01:00:16,480 --> 01:00:21,680
are kind of part of the package. So in that sense, a lot of app developers aren't necessarily

631
01:00:21,680 --> 01:00:27,120
doing those kinds of critical things that you would need to do in a self-hosted Postgres

632
01:00:27,120 --> 01:00:34,720
context. And their concerns are more about, in my view anyways, are more about efficiency in

633
01:00:34,720 --> 01:00:41,840
their use, limiting resource consumption to achieve greater concurrency and greater scale.

634
01:00:41,840 --> 01:00:46,000
And then capabilities, what can I do in my database that might simplify my

635
01:00:46,000 --> 01:00:52,160
operations where I don't need this big swath of code or this second database that is totally

636
01:00:52,160 --> 01:00:57,360
different and performs this narrow function? Can I just do that in Postgres instead?

637
01:00:57,360 --> 01:01:02,320
That sort of thing. So that's where I felt, yeah, I felt there were opportunities out

638
01:01:02,320 --> 01:01:07,760
in the broader development community to bring that Postgres knowledge, but not necessarily

639
01:01:07,760 --> 01:01:12,960
to a DBA type of reader, but to a developer that has those challenges.

640
01:01:16,080 --> 01:01:22,800
[CLAIRE] So I'm going to pivot because we have so much more ground to cover, but there's a story I

641
01:01:22,800 --> 01:01:29,200
really want to explore, and then we're going to come back to your book. But in your path to get

642
01:01:29,200 --> 01:01:35,760
to where you are now as this developer, you're a consultant too, right? So you do consulting for

643
01:01:35,760 --> 01:01:41,840
companies who need help with either their application, their backend, their Postgres.

644
01:01:41,840 --> 01:01:45,600
That's right, isn't it? Is that a good description or you have a better description?

645
01:01:45,600 --> 01:01:50,000
Yeah, that's right. Yeah. Mostly helping them with their use of Postgres and understanding,

646
01:01:50,000 --> 01:01:54,240
observing, and improving it. All right. But here's my question,

647
01:01:54,240 --> 01:02:00,560
and it has to do with cheese. When I had David Rowley on the show, and I'll drop a link to his

648
01:02:00,560 --> 01:02:07,520
episode in the chat, he's a Postgres major contributor and committer, and we explored

649
01:02:07,520 --> 01:02:14,480
how he got started as a developer and in Postgres. And I found, and I did not know this

650
01:02:14,480 --> 01:02:20,400
before we started the podcast episode, that his journey into Postgres began at a cheese factory.

651
01:02:20,400 --> 01:02:24,880
He was working at a cheese factory. And then later I was talking to Melanie Plageman,

652
01:02:24,880 --> 01:02:29,280
who was the next month's guest. We had her on the show in September, and Melanie

653
01:02:29,280 --> 01:02:37,280
also works at Microsoft, is a Postgres contributor, major contributor and committer.

654
01:02:37,280 --> 01:02:44,000
And in her case, we explore her path to becoming a Postgres committer. And I learned that she

655
01:02:44,480 --> 01:02:51,360
has a story having to do with a cheese factory as well that touched on her journey. So, okay,

656
01:02:51,360 --> 01:02:54,800
am I going to get a three for three? Did you ever work at a cheese factory?

657
01:02:54,800 --> 01:02:59,040
[ANDREW] I did work at a cheese factory.

658
01:02:54,800 --> 01:02:59,040
[CLAIRE] See, that is so weird.

659
01:02:59,040 --> 01:03:05,520
[ANDREW] It's so weird. I was, yeah, I think we sort of pre-baked this topic. But I almost like fell

660
01:03:05,520 --> 01:03:11,440
out of my chair when I was listening to both of those episodes. I've had the great pleasure of

661
01:03:12,080 --> 01:03:20,000
meeting David when I worked at a Microsoft company, and we were a small team within Microsoft,

662
01:03:20,000 --> 01:03:27,440
and David was offering Postgres office hours. And it was, it also is a real, it's, I'm glad that,

663
01:03:27,440 --> 01:03:30,880
I also wanted to bring up this cheese story so I could mention David and Melanie, which I'll do in

664
01:03:30,880 --> 01:03:35,920
a second. Yeah, David offered, you know, very generously these office hours internally to help

665
01:03:35,920 --> 01:03:42,240
folks use Postgres. And it was a great opportunity that I was really appreciative to have and asked

666
01:03:42,240 --> 01:03:48,320
all the questions I had about our usage. We talked a lot about vacuum and, you know, some of the

667
01:03:48,320 --> 01:03:56,160
operational challenges we were facing on the team, which was, it was great that David offered that,

668
01:03:56,160 --> 01:04:00,560
and was working on Postgres at the time, and enjoyed, I enjoyed the episode as well. I just

669
01:04:00,560 --> 01:04:06,880
listened to it recently. And then Melanie, I met at a more recent version of Postgres conference.

670
01:04:06,880 --> 01:04:11,840
I think it was the last year one, the New York city one.

671
01:04:06,880 --> 01:04:11,840
[CLAIRE] PGConf New York City. Yeah, I think

672
01:04:11,840 --> 01:04:17,920
last year she was on the talk selection team for that event as well.

673
01:04:11,840 --> 01:04:17,920
[ANDREW] Oh, okay. Yeah. I remember I

674
01:04:17,920 --> 01:04:22,320
had the chance to meet Melanie and I remember we talked a bit about, she had worked on the

675
01:04:22,320 --> 01:04:27,680
pg_stat_io system view. And that was something I wanted to better understand as like one of the

676
01:04:28,240 --> 01:04:34,880
more noteworthy additions to Postgres 16. I wrote a blog post about that. And then it was cool.

677
01:04:34,880 --> 01:04:40,080
Cause I was like, I got to ask her more about it in person. And for anyone listening to this,

678
01:04:40,080 --> 01:04:44,320
that has never been to a Postgres event, I always try to tell people, you know,

679
01:04:44,320 --> 01:04:50,000
like a lot of open source software, it's so cool to me that you can see these pillars

680
01:04:50,000 --> 01:04:56,000
of the community, these prolific developers like David and Melanie. And then often you can just go

681
01:04:56,000 --> 01:04:59,760
to these events and just meet them. You know, you can just say, hi, I'm Andrew. And, you know,

682
01:04:59,760 --> 01:05:05,840
thanks for all your work on Postgres and have a conversation. And so that was great. Yeah. And so

683
01:05:05,840 --> 01:05:10,480
it was really funny when I was listening to both of those episodes as fans of those people and fans

684
01:05:10,480 --> 01:05:15,920
of the podcasts and the topics to hear that they worked at cheese factories, because I, myself,

685
01:05:15,920 --> 01:05:21,600
in my college days, my story is not as cool. Like I did know software development, but I had a job

686
01:05:21,600 --> 01:05:27,200
when I was in college at a cheese factory here in Minnesota, that is like a producer or they're

687
01:05:27,200 --> 01:05:33,040
kind of like a packager or something like they'd get, they'd get these massive, like multi-ton

688
01:05:33,040 --> 01:05:38,240
blocks of cheese in and they'd slice and dice it into smaller quantities and

689
01:05:38,240 --> 01:05:43,200
then kind of ship it around the country. And, yeah, I just worked on the factory floor and

690
01:05:43,200 --> 01:05:49,120
it was a good job to have as a college student. And, you know, it was a funny connection.

691
01:05:49,760 --> 01:05:54,240
[CLAIRE] What's your favorite kind of cheese?

692
01:05:49,760 --> 01:05:54,240
[ANDREW] Oh, I don't know. I always kind of liked

693
01:05:54,240 --> 01:06:03,200
Swiss cheese. I kind of like the savory flavor. So like Swiss cheese or Havarti or I mean, really,

694
01:06:03,200 --> 01:06:08,000
really, I honestly, I love cheese. So any kind of cheese I'm up for trying,

695
01:06:08,000 --> 01:06:13,760
but I'd say I like some of the things with savory or sharp flavors. [Got it.]

696
01:06:15,840 --> 01:06:23,600
Although I will, I will say really briefly that after working for an entire Summer at a

697
01:06:23,600 --> 01:06:27,840
cheese factory, I didn't want anything to do with cheese for quite a while. Like you just,

698
01:06:27,840 --> 01:06:31,760
you just see it all the time and smell it and it just gets a little overwhelming. And then

699
01:06:31,760 --> 01:06:39,680
I took a hiatus from cheese, but I'm back.

700
01:06:31,760 --> 01:06:39,680
[CLAIRE] I had the opposite hiatus once I went to Japan,

701
01:06:39,680 --> 01:06:45,920
to Tokyo on a business trip. And I had the most amazing sushi of my life in Tokyo. It was

702
01:06:45,920 --> 01:06:52,000
incredible. Incredible. I live in California, so we have pretty great sushi restaurants and pretty

703
01:06:52,000 --> 01:06:58,080
great sushi and obviously easy access to seafood being near the coast, I would think. But

704
01:06:58,080 --> 01:07:04,880
Tokyo was so much better. And so when I came back to the United States, I couldn't eat sushi

705
01:07:04,880 --> 01:07:10,800
locally for like six months. I just was like, no, this is not good enough. I can't, I couldn't

706
01:07:10,800 --> 01:07:18,800
partake. And eventually my desire for sushi won out and I went back to eating it. Yeah.

707
01:07:18,800 --> 01:07:22,720
[ANDREW] Sushi is great. I mean, it makes sense to me. It's all kind of relative. Like even just in

708
01:07:22,720 --> 01:07:28,400
Seattle for me last week, I got airport sushi. Like after I landed, I was hungry for lunch.

709
01:07:28,400 --> 01:07:33,280
And even just at the airport, I felt like I noticed a quality improvement level compared

710
01:07:33,280 --> 01:07:38,480
with what I would get in Minnesota, even though here we have a lot of sushi restaurants and

711
01:07:38,480 --> 01:07:44,080
they do fly in, you know, my understanding is they fly fish in daily and whatnot. But,

712
01:07:44,080 --> 01:07:48,640
I just felt, okay, I'm closer to the ocean. Maybe it was psychosomatic, but I felt like the

713
01:07:48,640 --> 01:07:54,800
quality was higher.

714
01:07:48,640 --> 01:07:54,800
[CLAIRE] So I want to go back to the book and I want to talk about whether people have

715
01:07:54,800 --> 01:08:01,680
favorite parts. But before we do that, I realized that I have a discount code for ebooks for any

716
01:08:01,680 --> 01:08:07,600
listeners who want to check out your book and I haven't shared it yet. So I need to share

717
01:08:07,600 --> 01:08:16,320
it. So it's a 35% off discount code on the ebook and the discount code is ha ha ha

718
01:08:16,320 --> 01:08:21,200
TalkingPostgres all one word. So should be easy to remember if you're listening to this talking

719
01:08:21,200 --> 01:08:39,280
Postgres podcast. But the link that you need to go to is aka.ms/talkingpostgres-andyatki-35off

720
01:08:39,280 --> 01:08:46,080
So I'll put the link in the show notes as well for the episode.

721
01:08:46,080 --> 01:08:54,000
And yeah, that'll get you a discount, off of the ebook. There, now that that's done,

722
01:08:54,800 --> 01:08:58,240
I am curious whether you have a favorite part of the book?

723
01:08:58,240 --> 01:09:10,000
[ANDREW] I would say that after writing the chapter on indexes, in the book, the book has one

724
01:09:10,000 --> 01:09:15,680
chapter dedicated to indexes, not like the chapter, like in air quotes, but like the chapter in the

725
01:09:15,680 --> 01:09:22,320
book that's about indexes. I would say that I felt like this is probably if, if readers, I felt,

726
01:09:22,320 --> 01:09:29,120
I guess I liked it the best because I felt like if Rails devs pick up the book and read one

727
01:09:29,120 --> 01:09:34,880
chapter, they'd probably get the most from that chapter in terms of things they could really use

728
01:09:34,880 --> 01:09:40,800
in their day-to-day jobs. Like at any, I would say arguably at any scale, or any usage of Postgres,

729
01:09:40,800 --> 01:09:45,920
because some of the things, part of that is I think, that or maybe data constraints too,

730
01:09:45,920 --> 01:09:51,040
but I'll focus on indexes. But I think part of it is, I tried to write things in the book

731
01:09:51,040 --> 01:09:56,800
that would be intended to be used at high scale. Of course, like it's in the title of the book,

732
01:09:56,800 --> 01:10:02,240
you know, billions of rows. And like I said before, and thousands of concurrent queries,

733
01:10:02,240 --> 01:10:06,080
I would call that higher scale with like a single instance Postgres.

734
01:10:06,080 --> 01:10:13,120
But there's also like a lot of folks work on apps that will never reach that level of scale. It's,

735
01:10:13,120 --> 01:10:19,040
it's not because the app's not successful. It's just used in a,

736
01:10:19,040 --> 01:10:26,560
maybe a business context. And, you know, it's extremely valuable to the users,

737
01:10:26,560 --> 01:10:30,800
but it doesn't have thousands of concurrent queries and it doesn't have billions of rows,

738
01:10:30,800 --> 01:10:35,200
for example. And so I wanted to make sure there was content that would, in the book,

739
01:10:35,200 --> 01:10:39,680
that would make the book valuable for those readers as well. And I think, you know,

740
01:10:39,680 --> 01:10:47,120
indexes and really, really understanding the benefits to both read queries and write queries,

741
01:10:47,120 --> 01:10:52,720
it feels just really fundamental. I guess it also kind of implies reading query execution

742
01:10:52,720 --> 01:10:58,640
plans and knowing how to interpret that info. But yeah, I'd say, if a developer can do that,

743
01:10:58,640 --> 01:11:04,640
then they're, they're pretty well on their way to working well with any SQL database,

744
01:11:04,640 --> 01:11:10,800
you know, really reading query execution plans, and optimizing their indexes for their

745
01:11:10,800 --> 01:11:13,680
real query workload. I think that would be my answer.

746
01:11:14,880 --> 01:11:22,800
[CLAIRE] Cool. I love it. The other thing I wanted to ask you is, especially since I know, like you

747
01:11:22,800 --> 01:11:28,480
gave a talk at the PASS Data Summit last week, you've talked about PGConf NYC.

748
01:11:28,480 --> 01:11:35,600
So you have been to Postgres events. Is there a frequently asked question that you get from

749
01:11:35,600 --> 01:11:42,880
Rails developers about Postgres?

750
01:11:42,880 --> 01:11:49,360
[ANDREW] I think what's interesting about databases, well, one thing would be making schema changes safely.

751
01:11:49,360 --> 01:11:56,080
I think that the Rails framework, it doesn't actually have a concept of schema changes and by,

752
01:11:56,080 --> 01:12:01,280
because the word schema is overloaded here, just to briefly mention the, what I'm referring to,

753
01:12:01,280 --> 01:12:06,640
it's changing the structure of your database, whether it's adding a table or a column

754
01:12:06,640 --> 01:12:12,480
or an index or a constraint or something like that, like a structural change, not data and

755
01:12:12,480 --> 01:12:17,840
not the database schema object, but like the structure. There's a lot of things, you know,

756
01:12:17,840 --> 01:12:24,240
because we expect our database to be running continuously. I always have found the kind of

757
01:12:24,240 --> 01:12:28,400
engineering challenge of how do we basically change this thing at the same time it's,

758
01:12:28,400 --> 01:12:32,400
it's serving data. It's like writing and reading data to other connections,

759
01:12:32,400 --> 01:12:37,120
[it's like filling a plane with fuel while it's in flight] right. It's kind of weird,

760
01:12:37,120 --> 01:12:41,520
like in a physical structure, you wouldn't be expecting that necessarily that it can.

761
01:12:42,480 --> 01:12:49,040
Adapt, you know, modify its own design while still serving requests.

762
01:12:49,040 --> 01:12:53,760
So I always found that to be really cool. And so that's the idea of concurrent structure

763
01:12:53,760 --> 01:12:58,960
modifications, concurrent in the sense of other concurrent clients that aren't,

764
01:12:58,960 --> 01:13:03,600
don't care anything about the structure. You know, they're maybe just running a query.

765
01:13:03,600 --> 01:13:07,440
They do maybe in the sense of the reading data, but they have expectations about

766
01:13:08,560 --> 01:13:13,760
the availability of Postgres and the fields that they're accessing and whatnot. So I'd say,

767
01:13:13,760 --> 01:13:21,920
you know, I think it's a little mystical to some developers, what those both, what things

768
01:13:21,920 --> 01:13:27,600
work and do work because Postgres generally supports, I mean, I think in the book we covered

769
01:13:27,600 --> 01:13:32,320
almost every scenario I could think of as far as an online, you know, while Postgres is not

770
01:13:32,320 --> 01:13:36,960
being taken down or stopped in any way, like an online schema change or structure change.

771
01:13:37,600 --> 01:13:44,880
But like to achieve that sometimes there's some funny hoops to jump through. And I think it's a

772
01:13:44,880 --> 01:13:49,760
little, like I said, I think it's a little mystical. So I just want to quickly shout out,

773
01:13:49,760 --> 01:13:54,880
there's a great in the Ruby world, there's a great Ruby gem. There's several, but the one I like and

774
01:13:54,880 --> 01:13:59,920
wrote about in the book is called strong migrations. So the idea here with migration, again,

775
01:13:59,920 --> 01:14:06,640
as an overloaded term is those incremental schema changes. So not a major data,

776
01:14:06,640 --> 01:14:10,320
not like a heterogeneous database migration, but just an incremental change.

777
01:14:10,320 --> 01:14:18,480
So Rails uses that term migrations for those kinds of things. Django does as well. And so if

778
01:14:18,480 --> 01:14:24,320
we're adding an index, you know, what's the difference between doing that concurrently and not,

779
01:14:24,320 --> 01:14:30,640
and what are the impacts to which operations might be blocked if we didn't perform that

780
01:14:30,640 --> 01:14:36,400
concurrently. So I'd say, yeah, I mean, at a high level, that category of thing,

781
01:14:36,400 --> 01:14:41,040
there's a whole chapter, I believe, if I remember correctly now, it's been a little while,

782
01:14:41,040 --> 01:14:47,840
dedicated to this topic as well, but making safe schema changes, that would be one category.

783
01:14:47,840 --> 01:14:52,320
And I think also like locking and blocking a little bit related to that, but

784
01:14:52,320 --> 01:14:58,320
it also is a little mystical and it's a pretty complex area. So I think there's a lot of appetite

785
01:14:58,960 --> 01:15:04,400
amongst developers for that material, even if it's a little bit, almost evergreen,

786
01:15:04,400 --> 01:15:09,840
it's like, you know, which operations can I run that are going to block other operations and why,

787
01:15:09,840 --> 01:15:17,040
and how do I get visibility into that? And I'd say we have, I think the book has pretty good

788
01:15:17,040 --> 01:15:25,600
coverage of what kinds of queries will block other queries and what kinds of queries acquire which

789
01:15:25,600 --> 01:15:31,600
types of locks. But I would say also that might be another place to get started with this book,

790
01:15:31,600 --> 01:15:38,400
but also then go into the documentation or other maybe Postgres deeper books that focus on locking,

791
01:15:38,400 --> 01:15:42,400
because it's a very complex topic and there's other books with whole chapters

792
01:15:42,400 --> 01:15:47,280
dedicated to that topic. But yeah, I'd say that's another practical thing in the real world where

793
01:15:47,280 --> 01:15:53,280
we've got queries running that are updating a bunch of data and this update should

794
01:15:53,280 --> 01:15:57,600
be five milliseconds, but it's taking 30 seconds, what is going on, that kind of thing.

795
01:15:57,600 --> 01:16:06,880
[CLAIRE] You're reminding me that one of the most popular blog posts ever on the Citus blog was about

796
01:16:06,880 --> 01:16:14,640
locking in Postgres. Blocking. Oops. Sorry, I just got disconnected. You probably can't even hear me.

797
01:16:14,640 --> 01:16:15,680
[ANDREW] Oh, I can hear you. Yep.

798
01:16:18,160 --> 01:16:27,440
[CLAIRE] So I just dropped a link into the chat about it. It just, it performed incredibly well. People were

799
01:16:27,440 --> 01:16:34,000
hungry for that kind of information about locks in Postgres.

800
01:16:27,440 --> 01:16:34,000
[ANDREW] Yeah, because ultimately it's related to

801
01:16:34,000 --> 01:16:38,480
the concurrency you can achieve and it's related to user experience and those kinds of things are

802
01:16:38,480 --> 01:16:45,120
very visible. And consulting clients I've worked with too, it's a common theme is,

803
01:16:46,480 --> 01:16:53,200
how do I get better visibility into which operations are, you know, for my slow operations,

804
01:16:53,200 --> 01:16:58,240
which of them are slow because they, you know, not because the query itself, but because it was

805
01:16:58,240 --> 01:17:05,680
waiting to acquire a lock. And then Postgres has its own, it's kind of this like

806
01:17:05,680 --> 01:17:12,880
spider web of conversation too, where you get into lock types, lockable resources,

807
01:17:13,520 --> 01:17:17,600
transaction isolation levels. So there's just a lot of content there. And so,

808
01:17:17,600 --> 01:17:24,480
yeah, I think it's a good area because it touches everyone from, I'd say, from those two

809
01:17:24,480 --> 01:17:28,080
kind of communities we discussed where it's like developers to database administrators.

810
01:17:28,080 --> 01:17:33,360
And the solutions usually in my experience aren't, it's not like there's a silver

811
01:17:33,360 --> 01:17:38,240
bullet solution, you know, it's usually about trying to just get better understanding into

812
01:17:39,120 --> 01:17:46,480
your operations and then kind of mitigating some of the undesirable behavior,

813
01:17:46,480 --> 01:17:51,280
so reducing lock length, what's driving the length of a lock, like how do we reduce that? And

814
01:17:51,280 --> 01:17:55,680
that's probably going to be specific to your application. But yeah, I think that's another

815
01:17:55,680 --> 01:18:03,200
common area that folks want to learn more about.

816
01:17:55,680 --> 01:18:03,200
[CLAIRE] So because your expertise is in, as what was the

817
01:18:03,200 --> 01:18:08,400
phrase Elizabeth Christensen used, like you're spanning two different worlds, right? The Postgres

818
01:18:08,400 --> 01:18:13,760
world and the Rails world. I'm really curious when people hire you as a consultant, and I don't know

819
01:18:13,760 --> 01:18:19,920
if you tend to get hired more for three month gigs or six months or a full year or how that works,

820
01:18:19,920 --> 01:18:25,840
but do they hire you for your Postgres expertise or your Rails expertise or something else?

821
01:18:25,840 --> 01:18:32,880
[ANDREW] I think it's usually because of my Postgres expertise that is a skill they don't have on

822
01:18:32,880 --> 01:18:38,960
their team or like it might be a skill they have, but the people involved are not dedicated to

823
01:18:38,960 --> 01:18:48,960
that function. But I think it's usually because it's like beyond the ORM and like the higher

824
01:18:48,960 --> 01:18:54,080
usage, the higher kind of scale usage I was talking about, that's where there's usually

825
01:18:54,080 --> 01:18:58,320
from the clients I've had, there's a gap on their team, you know, it's kind of like

826
01:18:58,960 --> 01:19:03,520
I read these blog posts and I kind of know what's going on here, but how would you go about debugging

827
01:19:03,520 --> 01:19:09,280
this problem or what are the kinds of metrics we should be looking at, or what can we do about

828
01:19:09,280 --> 01:19:14,240
this? How do I actually fix it? And then if it's a team that uses Rails, like

829
01:19:14,240 --> 01:19:21,680
and our contract is a lot longer basically, I mean I'm happy to jump into the code base and start to

830
01:19:21,680 --> 01:19:26,240
make changes. And I have done that with some clients, especially earlier on. I would say I

831
01:19:26,240 --> 01:19:32,080
just kind of started doing my software developer thing, so to speak. But I also have found too

832
01:19:32,080 --> 01:19:39,440
with clients, they want the ownership, both the knowledge and the actions that are taken

833
01:19:39,440 --> 01:19:44,320
based on that to be with their team, which is tricky as a consultant because it

834
01:19:44,320 --> 01:19:51,840
it sort of shifts my role to be more of a coach or a guide in some cases, which is

835
01:19:51,840 --> 01:19:56,560
okay. It's just that it's, which I really enjoy doing and actually it's very fulfilling to

836
01:19:56,560 --> 01:20:01,760
bring, you know, for someone to come to you with a problem that's like, I don't know what's going

837
01:20:01,760 --> 01:20:05,840
on, and then for me to feel like I immediately know what's going on and to bring that

838
01:20:05,840 --> 01:20:10,400
information to them, that's very fulfilling. It feels validating of putting in a lot of work

839
01:20:10,400 --> 01:20:16,400
to try to understand some things. However, it also can mean that in terms of a commercial

840
01:20:16,400 --> 01:20:21,440
relationship it might be shorter, you know, versus if I'm doing work day to day. But it

841
01:20:21,440 --> 01:20:25,680
makes sense to me like with the companies I've worked for as well, they want their developers

842
01:20:25,680 --> 01:20:32,400
to gain these skills, they want them to solve the issues. So yeah, I think I've sort of shifted

843
01:20:32,400 --> 01:20:38,640
my, I think it's just sort of a little bit of the trade-off of the kind of specialized consulting

844
01:20:38,640 --> 01:20:46,400
that I usually aim for, which is this kind of specific Postgres guidance within the usage of a

845
01:20:46,400 --> 01:20:52,400
web application. It's just going to be probably a little bit shorter or, you know, scoped in maybe

846
01:20:52,400 --> 01:20:58,880
different ways. But what I've driven towards more recently is more of an assessment model where

847
01:20:58,880 --> 01:21:06,080
I'm going to likely bring in some Postgres, well I mean not likely, I will bring

848
01:21:06,080 --> 01:21:12,720
in some Postgres recommendations beyond what would be within the purview of the app, you know. So

849
01:21:12,720 --> 01:21:18,480
sizing the instance, what kind of cost efficiency are we actually getting,

850
01:21:18,480 --> 01:21:25,600
architecturally what kind of usage can we expect from this architecture, before we might

851
01:21:25,600 --> 01:21:31,680
re-architect or restructure queries or even consider alternative architectures, parameter

852
01:21:31,680 --> 01:21:39,360
tuning and kind of more like system-wide index tuning and things like that. So kind of like a,

853
01:21:40,560 --> 01:21:46,240
you know, a DBA lite function as well for a team that doesn't have someone like that on their team as well. 

854
01:21:46,240 --> 01:21:55,120
[CLAIRE] You've talked a bit about scalability and sizing the database and the

855
01:21:55,120 --> 01:22:01,360
resources and things that you need in order to support the application. And so anybody who's a

856
01:22:01,360 --> 01:22:08,720
regular listener on this podcast probably knows my origin story, that I got involved in Postgres by

857
01:22:08,720 --> 01:22:14,080
joining a small startup called Citus Data. And the Citus open source extension of course transforms

858
01:22:14,080 --> 01:22:19,920
Postgres into a distributed database. So I just have to ask, there's no chapter on Citus in this

859
01:22:19,920 --> 01:22:25,680
book. What's up with that?

860
01:22:19,920 --> 01:22:25,680
[ANDREW] Yeah, I did actually, my, one of my criteria was I wanted all of the

861
01:22:25,680 --> 01:22:32,160
content to be open source content. And I felt that spoke to the, a lot of like a lot of why

862
01:22:32,160 --> 01:22:38,240
folks like Postgres, it's arguably the world's most popular open source database as

863
01:22:38,240 --> 01:22:44,560
opposed to a commercial one. And Citus is an open source.

864
01:22:38,240 --> 01:22:44,560
[CLAIRE] "The world's most advanced open source relational database"

865
01:22:44,560 --> 01:22:52,080
There you go. Official tagline.

866
01:22:44,560 --> 01:22:52,080
[ANDREW] Thank you. And so Citus meets that criteria as an open

867
01:22:52,080 --> 01:22:59,520
source extension. And so no concerns there. I mean there are some other extensions that are

868
01:22:59,520 --> 01:23:07,600
in heavy use too that folks wondered why there was no coverage of like PostGIS for example, or

869
01:23:08,400 --> 01:23:16,800
the Timescale extension for time-series oriented data. Honestly, the main answer was just,

870
01:23:16,800 --> 01:23:22,720
I didn't have real authentic production experience to speak to that I felt would be strong

871
01:23:22,720 --> 01:23:30,080
enough to include in the book. Also it kind of was on the bubble and it was cut in terms of scope

872
01:23:30,080 --> 01:23:36,000
because of how long the book was getting, it came in at 15 chapters. I think initially

873
01:23:36,000 --> 01:23:42,400
we were more in the 10 to 12 range and we were in the 300 pages and it ended up being over 400 pages.

874
01:23:42,400 --> 01:23:47,360
And it just takes a lot, the bigger the book, the more production time it takes

875
01:23:47,360 --> 01:23:52,480
because there's, for example, a layout person that goes through every page and makes

876
01:23:52,480 --> 01:23:58,240
sure that code doesn't spill between pages and things like that. And so at a certain point I

877
01:23:58,240 --> 01:24:02,800
did have to cut it off and even the, I even generally...

878
01:23:58,240 --> 01:24:02,800
[CLAIRE] Okay, okay, okay. You're sounding

879
01:24:02,800 --> 01:24:10,480
defensive now. Okay. So in short, it didn't make the cut, but more importantly, you didn't have the

880
01:24:10,480 --> 01:24:15,120
authentic experience. And that is, I think, part of what makes your book so valuable. Like all the

881
01:24:15,120 --> 01:24:21,840
rest of the stuff that you talk about is based on your learnings, the work that you've

882
01:24:21,840 --> 01:24:29,280
done, right, as a developer, running on Postgres. [Yeah. It is.] Ok, that's fair.

883
01:24:29,280 --> 01:24:34,720
[ANDREW] I just want to add one more quick one too, I also really identified with, I kind of

884
01:24:34,720 --> 01:24:39,600
got, I'm not the only person to say this by any means, but like the idea of "just use Postgres",

885
01:24:39,600 --> 01:24:44,960
where Postgres has a lot of capabilities that folks might not necessarily think of

886
01:24:44,960 --> 01:24:50,560
first, they might think of other specialized databases for. I also think of, I also like to

887
01:24:50,560 --> 01:24:58,080
advocate for just using single instance Postgres for as long as you can because distributed systems

888
01:24:58,080 --> 01:25:07,120
are more complex. And if your team has a really good mental model of what the capabilities

889
01:25:07,120 --> 01:25:12,240
are with single instance Postgres, including replication and using replica instances and

890
01:25:12,240 --> 01:25:16,560
you know, both types of replication, which both are covered in the book, for example.

891
01:25:16,560 --> 01:25:22,400
If they have a good mental model of that, you can lean on that for a long time,

892
01:25:22,400 --> 01:25:26,720
you know, and today's instances that you can purchase or, you know, you can, if your business

893
01:25:26,720 --> 01:25:33,040
is successful, you can afford very high powered instances with very good performance, which I do

894
01:25:33,040 --> 01:25:38,640
think it means that it lessens the need for something like Citus a bit, or even for like

895
01:25:38,640 --> 01:25:44,320
application level sharding, which we also discuss in the book. And so I do really like the idea of

896
01:25:44,320 --> 01:25:50,560
advocating for trying to keep things simple as well. And, you know, so one of the feedbacks

897
01:25:50,560 --> 01:25:54,720
I got from one of the readers was even talking about table partitioning, you know,

898
01:25:55,360 --> 01:25:59,520
make sure that there's lots of kind of warnings and things up up front so that people aren't just

899
01:25:59,520 --> 01:26:04,880
kind of diving into this without understanding what the operational new challenges are that

900
01:26:04,880 --> 01:26:10,240
they'll have by way of using table partitioning, for example, and I really appreciated that

901
01:26:10,240 --> 01:26:15,280
feedback, because we could frame the introduction of that to be more around like, if you're

902
01:26:15,280 --> 01:26:19,360
experiencing these problems, then this is a solution, not just like you should dive into

903
01:26:19,360 --> 01:26:23,680
this because it's got these capabilities that you might need someday. It's like, no, wait until you

904
01:26:23,680 --> 01:26:28,560
really have that issue. Because then you'll get the benefits right away. And you'll know

905
01:26:28,560 --> 01:26:37,600
that it's worth the toil that you'll be taking on.

906
01:26:28,560 --> 01:26:37,600
[CLAIRE] I'm looking, I got a little distracted.

907
01:26:37,600 --> 01:26:43,680
I'm looking at the blog post that I guess you published about how readers get their copies of High

908
01:26:43,680 --> 01:26:50,960
Performance Postgres for Rails. And I'm not going to tell you that I'll wait for the second edition,

909
01:26:50,960 --> 01:26:56,800
where you'll be adding a chapter on Citus, ha ha ha, hint hint hint, in order to send you a picture,

910
01:26:56,800 --> 01:27:02,240
I'm going to make sure to get you a photo of myself with this new book. Which, as you said,

911
01:27:02,240 --> 01:27:07,120
is more than 400 pages. So that's why I didn't bring it up to the PASS Summit to have you

912
01:27:07,120 --> 01:27:13,520
autograph it last week. It was too heavy to fit in my luggage. I couldn't, and it is, it's dense.

913
01:27:13,520 --> 01:27:21,760
It is really heavy. So yeah. But for any of you who want an ebook, just take a look at the show

914
01:27:21,760 --> 01:27:27,840
notes. And there's a link there along with a 35% off discount code you can use to get your own copy

915
01:27:27,840 --> 01:27:36,800
digitally. [Awesome]. And I think I've we've covered a lot of ground in this episode. I do not have

916
01:27:36,800 --> 01:27:43,040
anything else that I absolutely have to ask you. Is there anything else that you absolutely have

917
01:27:43,040 --> 01:27:51,840
to share that I neglected to ask you? 

918
01:27:51,840 --> 01:28:04,000
[ANDREW] I would say, I guess, I think working in open source technologies, I guess, just to close on like a

919
01:28:04,000 --> 01:28:09,600
people-centric kind of point, if folks are interested in these technologies,

920
01:28:09,600 --> 01:28:14,800
like there are the, there are the books and the courses and ways to learn, you know,

921
01:28:14,800 --> 01:28:18,880
documentation and usage and stuff. And I think there's a lot to be said though, too, for

922
01:28:18,880 --> 01:28:26,880
these in-person events and going and meeting the community. And it, it just feels kind of neat.

923
01:28:26,880 --> 01:28:30,560
It's almost like they're part of your team in a sense, you know, I know that there are these

924
01:28:30,560 --> 01:28:37,920
Postgres folks that attend events I can interact with and then the same on the Rails side too.

925
01:28:37,920 --> 01:28:42,560
Like, you know, like at Rails World, there was the creator of Rails and the creator of the Ruby

926
01:28:42,560 --> 01:28:49,680
language who flew in from Japan, which was amazing. And so I think I love that about open source that

927
01:28:49,680 --> 01:28:57,840
you can connect the people with the things and kind of build your industry participation,

928
01:28:57,840 --> 01:29:01,920
like in person as well, besides, you know, your use at home and at work and that kind of thing.

929
01:29:03,280 --> 01:29:08,160
[CLAIRE] I couldn't agree more. What was really cool this year at PGConf.EU, which just,

930
01:29:08,160 --> 01:29:14,400
just happened a couple of weeks ago in Athens, Greece. PGConf.EU obviously is in Europe and

931
01:29:14,400 --> 01:29:21,120
it changes city and country every year. So it's in a different location. I mean,

932
01:29:21,120 --> 01:29:28,480
they do eventually repeat cities, but not for a decade, right. And it was so cool to

933
01:29:28,480 --> 01:29:32,800
walk in the room and I was just chit chatting with people and someone from the registration desk

934
01:29:32,800 --> 01:29:39,040
just came and handed me my badge. It wasn't one of those impersonal events where you have to

935
01:29:39,040 --> 01:29:45,120
show ID, et cetera, et cetera. I really felt I belonged. Now that didn't happen overnight, right.

936
01:29:45,120 --> 01:29:52,160
I've been involved in this community since 2017. But, it's heartwarming.

937
01:29:52,160 --> 01:30:00,000
And I do love in person, but I will also, you're giving me the opportunity to mention

938
01:30:00,000 --> 01:30:06,480
POSETTE: An Event for Postgres, which is an annual virtual conference with 40-ish talks every year that

939
01:30:06,480 --> 01:30:12,480
are about a half hour long each that my company and my team actually helps—well, we don't just

940
01:30:12,480 --> 01:30:19,280
help—we do organize it. And you were a speaker last year, which I really, really appreciated you

941
01:30:19,280 --> 01:30:27,600
submitting to the CFP, the call for proposals. And literally within days, the CFP is going to

942
01:30:27,600 --> 01:30:34,880
open for next year's POSETTE: An Event for Postgres. So hopefully users of Postgres open source or

943
01:30:34,880 --> 01:30:40,480
Azure Database for PostgreSQL or developers, contributors, et cetera, will all be, you know,

944
01:30:40,480 --> 01:30:48,720
submitting their proposals again. PGConf.dev's CFP is also open right now. FOSDEM PGDay's

945
01:30:48,720 --> 01:30:56,400
CFP is also open. There's a bunch of Postgres speaking opportunities. And sometimes people think,

946
01:30:56,400 --> 01:31:03,680
oh, only the Postgres experts get to speak or only the Postgres contributors are speakers.

947
01:31:03,680 --> 01:31:11,040
But in fact, people love user stories. They love customer stories. So if you use Postgres,

948
01:31:11,040 --> 01:31:16,640
yeah, submit, make a proposal, share your story. Yeah. It could be awesome.

949
01:31:16,640 --> 01:31:22,080
[ANDREW] I wanted to just +1 that too. I talk with developers that have never, you know,

950
01:31:22,080 --> 01:31:25,600
going all the way back to what you're talking about with planting a seed. I think for anyone

951
01:31:25,600 --> 01:31:30,080
listening to this, that is any, in any kind of influential position or, you know, just on a team

952
01:31:30,080 --> 01:31:35,600
of developers, if you all use Postgres and you felt you had some hard earned win, yeah,

953
01:31:35,600 --> 01:31:41,120
consider presenting it at your, maybe just on your team to start if you want, if that's

954
01:31:41,120 --> 01:31:46,320
more comfortable. [Or local user group, maybe.] Local user group or regional conference, or, you

955
01:31:46,320 --> 01:31:52,320
know, if you really want to go for PGConf NYC, PGDay Chicago in the United States is

956
01:31:52,320 --> 01:31:58,560
another one that I'm been involved with. Claire and I were on the CFP, the talk selection committee,

957
01:31:58,560 --> 01:32:02,720
for that as well earlier this year. But yeah, I just wanted to +1 the message that

958
01:32:02,720 --> 01:32:07,120
people want to hear about how it's used both Postgres developers, you know, like they,

959
01:32:07,120 --> 01:32:13,280
they might be very internals focused and they want to know, the Postgres users are

960
01:32:13,280 --> 01:32:18,160
kind of the customers in a sense, they're the using the platform, but also there can be

961
01:32:18,160 --> 01:32:22,720
kind of peer level learning with, you know, oh, this developer over at this other team,

962
01:32:22,720 --> 01:32:26,560
they're doing this feature and I hadn't even considered that or whatever, that kind of thing.

963
01:32:26,560 --> 01:32:33,680
So I think it's a good message to get out that case study style presentations, there's definitely

964
01:32:33,680 --> 01:32:40,160
a lot of appetite for that. And don't diminish your usage experiences as, you know, possibly

965
01:32:40,160 --> 01:32:47,840
being interesting and useful to others.

966
01:32:40,160 --> 01:32:47,840
[CLAIRE] I am a +1. We are in wild agreement with each other.

967
01:32:48,720 --> 01:32:53,120
But at least we had a few disagreements too. So it's all good, right? [It's all good.]

968
01:32:53,120 --> 01:33:00,640
Okay, let's wrap this up. I want to thank you so much, Andrew Atkinson for joining us here on

969
01:33:00,640 --> 01:33:08,000
Talking Postgres. The next episode, episode 22 will be recorded live on Wednesday, December 4th

970
01:33:08,000 --> 01:33:16,240
at 10am PST. And our guest next month in December will be Affan Dar. And the topic will be leading

971
01:33:16,240 --> 01:33:22,720
engineering for Postgres on Azure. Affan is fascinating, and I'm really excited to talk

972
01:33:22,720 --> 01:33:28,720
to him on that episode. So mark your calendar if you want to participate live on the parallel text

973
01:33:28,720 --> 01:33:40,240
chat at aka.ms/TalkingPostgres-Ep22-cal. You can always get to past episodes and get links to

974
01:33:40,240 --> 01:33:47,440
subscribe to the podcast on all the platforms at TalkingPostgres.com. And transcripts are included

975
01:33:47,440 --> 01:33:53,200
on those episode pages at TalkingPostgres.com as well. And before we leave, if you enjoy this

976
01:33:53,200 --> 01:33:59,920
podcast, please tell your friends. Most of us in the developer world do not like being advertised

977
01:33:59,920 --> 01:34:06,880
to or marketed to, but we love word of mouth. So if you've enjoyed the podcast, tell them on social,

978
01:34:06,880 --> 01:34:12,960
tell them in person, in DMs, however you want to tell them. The hashtag is #talkingpostgres,

979
01:34:12,960 --> 01:34:18,240
and word of mouth is one of the best ways to help people discover a podcast. And a big thank you to

980
01:34:18,240 --> 01:34:24,320
everybody who joined the live recording and participated in the text chat on Discord. Thank you.