Open Source Contributions to Postgres: The Basics POSETTE 2024

ElizabethGarrettChri 57 views 43 slides Jun 13, 2024
Slide 1
Slide 1 of 43
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43

About This Presentation

Postgres is the most advanced open-source database in the world and it's supported by a community, not a single company. So how does this work? How does code actually get into Postgres? I recently had a patch submitted and committed and I want to share what I learned in that process. I’ll give...


Slide Content

Hi there!Hi there!

Docs are important
Strengths
Weaknesses
Opportunities
for existing users
for releases
for adoption
incredible reference
manual
accuracy
above bar for open-
source
document new
features that connect
to other features
correct mistakes or
clarifications
lacks tutorials
lacks detailed
examples

architects
PostgresPostgres
needsneeds
lots oflots of
differentdifferent
peoplepeople
developers
dbas
data science
consultants
products

PostgresPostgres
Code BaseCode Base
Let’s review some of the basic processes, like:
Postgres version calendar
Where is the code?
Where do commits go?
How goes it get to end users?

Where is theWhere is the
Postgres code?Postgres code?

Where is theWhere is the
Postgres code?Postgres code?
https://github.com/postgres/postgreshttps://github.com/postgres/postgres
https://git.postgresql.org/https://git.postgresql.org/

git.postgresql.orggit.postgresql.org
is the actual code storeis the actual code store
oonly committers can pushnly committers can push

KeyKey
PostgresPostgres
CodeCode
TeamsTeams
Committers
Core Team
Release
management (RMT)

Patch ideasPatch ideas
What has been a problem for you?
Docs can be a good place to start
https://wiki.postgresql.org/wiki/Todo
Talk to people in Postgres

Potentially lots of discussion
of your ideas

BuildingBuilding
PostgresPostgres
locallylocally

Meson
https://www.postgresql.org/
docs/current/install-
meson.html
Make
https://www.postgresql.org/
docs/current/install-
make.html

> ninja docs
[3/3] Generating doc/src/sgml/html with a custom command
> meson setup build
The Meson build system
Version: 1.2.3
Source dir: /Users/elizabethgarrettchristensen/Documents/GitHub/2/postgres
Build dir: /Users/elizabethgarrettchristensen/Documents/GitHub/2/postgres/build
Build type: native build
Project name: postgresql
Project version: 17devel
> cd build
> brew install docbook-xsl

> sudo ninja install
> ninja test
> mkdir ~/pgsql-17-data
> initdb -D ~/pg-17-data
> psql postgres

> sudo ninja install
> ninja test
> mkdir ~/pgsql-17-data
> initdb -D ~/pg-17-data
> psql postgres
Regression tests

CodingCoding
conventionsconventions
https://wiki.postgresql.org/
wiki/Submitting_a_Patch

> git checkout -b elizabeth/docs-patch-idea-1
> git commit
> git format-patch -1 HEAD

v1-0001-Adding-Summary-Index-Info-to-HOT-Update-Documentation.patch

Postgres mailing lists
https://www.postgresql.org/list/
pgsql-novice
pgsql-general
pgsql-hackers
Beginner type questions
General list
Patch files and code discussions go here

List archives are onlineList archives are online
If you hate mailing lists .......

Every thread has a unique URL

Hackers
https://www.postgresql.org/list/
is a list you can submit to without subscribing to
has reply-all as default, so you’ll get replies about
your PATCH
Note: hackers is not for questions or newbies

PatchPatch
submissionsubmission
1 - Email patch file to Hackers
2 - Add patch to commitfest

CommitfestCommitfest
https://commitfest.postgresql.org/
You can add new patches here so they don’t get
lost
Lists of active patches, authors, reviewers, and committers
Active status and final outcome, rejected,
committed, withdrawn

Code reviewCode review
andand
testingtesting
conventions
/ re
unit testing / regression
really high standards

TipsTips
be prepared for lots of feedback
make this a learning experience
don’t take it personally
be patient

Getting aGetting a
commitcommit

Recent commitfestsRecent commitfests
26% committed26% committed

WhatWhat
happenshappens
next?next?

WhatWhat
happenshappens
next?next?
Both mirrors are updated
Code is included in next package
Docs are updated with minor release

Places to join thePlaces to join the
Postgres communityPostgres community
Slack
Local Meetups
PGConf NYC & pgDay Chicago
pgUS

Thank youThank you
very much!very much!
see you at the next meetup
sqlliz