]> Untitled Git - articles.git/commitdiff
Добавил английскую версию описания курса "Как стать разработчиком ядра PostgreSQL...
authorNikolay Shaplov <dhyan@nataraj.su>
Wed, 7 Jan 2026 09:43:40 +0000 (12:43 +0300)
committerNikolay Shaplov <dhyan@nataraj.su>
Wed, 7 Jan 2026 09:43:40 +0000 (12:43 +0300)
slides/2025 - Becoming PosgtreSQL Core Developer/README.eng.md [new file with mode: 0644]
slides/2025 - Becoming PosgtreSQL Core Developer/README.md

diff --git a/slides/2025 - Becoming PosgtreSQL Core Developer/README.eng.md b/slides/2025 - Becoming PosgtreSQL Core Developer/README.eng.md
new file mode 100644 (file)
index 0000000..601b41a
--- /dev/null
@@ -0,0 +1,86 @@
+# Lecture course "How to become PostgreSQL core developer. First Steps"
+
+This course is designed for students that have not yet become actual system level developers, but have a desire to become one, or just have enough curiosity to spend time messing with system level stuff. 
+One do not need any system development experience to join this course; you will need just any development experience, knowledge of C language as it is studied in universities, and you also need to be an intermediate Linux user (including console)
+
+In this course we will move from simple examples, deep down into the PostgreSQL core.
+You will learn how to read and explore PostgreSQL code, understand it, and use this knowledge for solving your tasks.
+Throughout the course we will solve series of practical exercises that will allow you to get familiar with various parts of PostgreSQL source code, with all kind of tricks used in postgres.
+
+If all goes well, after the whole course student should be in generally acquainted with most part of PostgreSQL code, and should be able to figure out the rest, or dig deeper into certain part of the code on his own.
+
+This course does not aim deep studying of data processing techniques and algorithms, there are good courses for it elsewhere, but we are to study all the code infrastructure that is used for implementing these algorithms in practice.
+This knowledge will allow you to study them later.
+
+This course is still work in progress.
+For now there are 3 lectures available:
+
+
+- Creating your first PostgreSQL extension
+- Basic Structures: Register Data Type
+- Basic Structures: Variable Length Values
+
+There are plans for
+
+- Compiling and Debugging PostgreSQL
+- Creating Own Data Type (several lectures)
+- Global User Configure Options
+- Memory management / Memory contexts
+- Lists and other data structures
+- Caches in PostgreSQL
+- Improving query syntax
+
+## Course delivery modes
+
+This course can be taught in different "modes"
+
+1. **Lecture mode**. For a large audience this course can be taught in "lecture mode", when only slides are shown on the screen, everything explained theoretically, and and students will have to practice on their own. This mode's advantage is ability to reach large number of people, and main disadvantage is that most students are too lazy to do practice on their own, and others may need help teachers while doing exercises, but they will get none.
+
+2. **Masterclass mode**. This mode works for smaller audience, when each student brings own laptop with Ubuntu (or other Debian-based Linux) installed, teacher first shows some slides, do some talking part, then switch to the console, and shows the discussed examples in "live" mode.
+Students tries to do the same on their laptops and getting help from teacher and assistants, if they need one.
+This way students get more deep experience, but the audience have to be small.
+For bigger audience you will need more experienced assistants.
+
+In "Masterclass mode" expert usually shows how does he actually work.
+That is why author added supplementary lecture "Vim for PostgreSQL developers", so students can follow him working with vim in "Masterclass mode".
+If you are giving this masterclass on your own, you should probably skip this vim lecture, and tell about IDE you are actually using instead. 
+
+3. **Mixed mode**. The best results are reached when you mix two modes.
+First you give first lecture for as many structures as possible in "Lecture mode", and then you invite them to a masterclass, and then repeat from the start in "masterclass mode".
+This way you make sure that as may as possible potential students will have chance got get acquainted with the course, and less random students will come to masterclass, since  
+they will have chance to decide if they really need this course or not.
+This will save your efforts keeping only engaged students, that are really interested in the subject.
+
+4. **Self study mode**. Slides for this talk is publicly available and one can use them for self study.
+Author presumes, that slides has enough information for studying the course on your own, though it might be quite a challenge, since the material have not been adapted for self study purposes, but still you can try.
+If you success with that, please let us know.
+
+
+## Masterclass prerequisites
+
+This masterclass is designed to be suitable for large variety of students. Nevertheless there are some prerequisites for students to join the masterclass
+
+1. Student should know C programming language the way it is taught in universities
+2. Student should have some basic knowledge about databases, and know how to write simple SQL queries.
+3. Student should have just any kind of IT development experience, or be a student at some IT collage or university.
+4. Student should be confident Linux user (including console), being able to solve routine OS-related problems on his own.
+5. Student must bring his own laptop with Ubuntu Linux (or any other Debian-based Linux), to perform exercises.
+Running Linux in virtual machine usually is a bad idea, since we will need to copy-paste a lot of example code from slides to editor, much better to have Linux run natively on real hardware.
+
+### Preparing your Linux laptop
+
+Before attending masterclass, please make sure, you are able to do following things with your Ubuntu Linux laptop:
+
+1. Check that you have root access on your system (run `sudo su` in a console. You should get to a session with hash (`#`) in prompt. This means you are root (super user) now).
+
+2. Make sure that PostgreSQL is installed on your system (run `sudo -u postgres psql`, it should get you command line interface of PostgreSQL).
+
+3. Make sure you have only one PostgreSQL data cluster on your system (run `sudo pg_lsclusters` command. It should give you only one green line, and there should be no red lines at all). If you have more then one cluster, then you should fix that on your own. Most probably delete unused clusters and upgrade active cluster to latest version. But there might be other cases. Be careful, do not loose your data. (This new inactive clusters are created when you upgrade your system to new version, and it is expected that you will upgrade it manually, but almost nobody actually do that)
+
+4. Make sure that you have only one version of PostgreSQL installed on your system  (run `apt list --installed "postgresql-*"` it will show the list of installed PostgreSQL `.deb` packages. Some of the packages should have a numeric suffix, like `-17` or minus-any-other-number. This is version suffix). If you have packages of different versions installed in your system (this might happen if your system survived several OS upgrades), you should manually remove old ones.
+
+5. If you found and fixed the issues in items 3 and 4, please make sure that PostgreSQL still works, as we did in item 2.
+
+6. Add repositories with package sources into your package system in file `/etc/apt/sources.list`, or in files from `/etc/apt/sources.list.d` directory (it depends on version of your OS). (Long story short: make copy of all lines that starts with `deb ` and replace `deb` with `deb-src` in your copies), then update package info using `sudo apt-get update`. After that make sure, you can get source code for `postgresql` package: `apt-get source postgresql`.
+
+7. Make sure that you are able to edit text files using one of the console text editors:  `nano`, `mcedit`, `vim`, `emacs` or any other of your choice. 
index c31277bb939eb68a264f52227861aa4d4b40ee46..51b1cdd146d5f148ecdc542d1794566f05cf58b0 100644 (file)
@@ -1,3 +1,7 @@
+For English version see [README.eng.md]
+
+FIXME: в английской версии сейчас более актуальная информация, ее надо перенести в русскую версию 
+
 # Курс лекций "Как стать разработчиком PostgreSQL"
 
 Данный курс предназначен для начинающих разработчиков, еще не погрузившихся в мир системного программирования в общем и не знакомых с внутреннем устройством PostgreSQL в частности.
 
 Перед мастер-классом пользователю следует:
 
-1. Убедиться, что он имеет доступ к режиму администратора в системе (команда `sudo su` должна вызывать консоль в режиме адимнистратора с диезом (`#`) в приглашении).
+1. Убедиться, что он имеет доступ к режиму администратора в системе (команда `sudo su` должна вызывать консоль в режиме администратора с диезом (`#`) в приглашении).
 
-2. Убедиться, что в системе утстановлен PostgreSQL (команда `sudo -u postgres psql` должна вызывать командно-строчный интерфейс к PostgreSQL).
+2. Убедиться, что в системе установлен PostgreSQL (команда `sudo -u postgres psql` должна вызывать командно-строчный интерфейс к PostgreSQL).
 
-3. Убедиться, что в системе развернут только один кластер PostgreSQL (команда `sudo pg_lsclusters` должна выводить только одну зеленую строчку и ни одной красной). В случае, если кластеров оказалось более одного (а такое случается, если система пережила несколько мажорных обновлений), самостоятельно свести количество кластеров к одному. Будте бдительны, не потеряйте свои данные, они могут оказаться в одном из старых кластеров.
+3. Убедиться, что в системе развернут только один кластер PostgreSQL (команда `sudo pg_lsclusters` должна выводить только одну зеленую строчку и ни одной красной). В случае, если кластеров оказалось более одного (а такое случается, если система пережила несколько мажорных обновлений), самостоятельно свести количество кластеров к одному. Будьте бдительны, не потеряйте свои данные, они могут оказаться в одном из старых кластеров.
 
 4. Убедиться, что в системе установлена только одна версия PostgreSQL (команда `apt list --installed "postgresql-*"` должна выдавать список только с одним числовым суффиксом, например, `-17` или "минус любое число", но какое-то одно). В случае, если версий постгреса оказалось более одной (а такое может случиться, если система пережила несколько обновлений), следует удалить более старые версии.
 
-5. Если были обнаружены и устранены проблемы из пп. 2 и 3, убедитесь, что постгрес все еще работает: перезагрузите систему и провторите п. 2.
+5. Если были обнаружены и устранены проблемы из п. 2 и 3, убедитесь, что постгрес все еще работает: перезагрузите систему и повторите п. 2.
 
 6. Прописать в системе репозитории с исходными кодами пакетов.`/etc/apt/sources.list` или в `/etc/apt/sources.list.d` (зависит от версии) (все строки начинающиеся с `deb ` продублировать и заменить в дубликатах `deb` на `deb-src`), обновить список пакетов командой `sudo apt-get update`. Убедиться, что можно получить исходный код для пакета `postgresql`: `apt-get source postgresql`