Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
RuDB PostgreSQL 19 build notes
===============================
 
Canonical product identity is stored in config/rudb_version.conf.
Do not hardcode RuDB product version, build date, or PostgreSQL product major
in packaging scripts.
 
Validated integrated configure profile:
 
  REPO="$(pwd)"
  BUILD=/tmp/rudb-pg19-build
  INSTALL=/opt/rudb-19
 
  rm -rf "$BUILD"
  mkdir -p "$BUILD"
  cd "$BUILD"
 
  "$REPO/configure" \
    --prefix="$INSTALL" \
    --enable-tap-tests \
    --with-libxml \
    --with-libxslt \
    --with-ssl=openssl \
    --with-pcre2 \
    --with-lz4 \
    --with-zstd
 
  # libcurl (>= 7.61.0) is a mandatory build prerequisite: it is always
  # detected and linked, with no configure flag. Install the dev package
  # (e.g. libcurl4-openssl-dev) before configuring.
 
  # --with-lz4/--with-zstd are required from CFS phase 1 (compressed file
  # system codec); phase 0 validated configure plus core module builds only.
 
Core and contrib build/install:
 
  make -j"$(nproc)" all
  make -C contrib -j"$(nproc)" all
  sudo make install
  sudo make -C contrib install
 
Fresh cluster smoke:
 
  rm -rf /tmp/rudb-pg19-data
  "$INSTALL/bin/initdb" -D /tmp/rudb-pg19-data
  "$INSTALL/bin/pg_ctl" -D /tmp/rudb-pg19-data -l /tmp/rudb-pg19.log start
  "$INSTALL/bin/psql" -d postgres -c "select rudb_version(), rudb_build_number();"
  "$INSTALL/bin/pg_ctl" -D /tmp/rudb-pg19-data stop
 
Product convenience wrappers:
 
  ./full_build.sh
  ./full_build.sh --dev
  ./full_build.sh --alt
  ./full_build_db_create_run_tests.sh --test_name=<regression-test>
 
Package generators:
 
  distr/ASTRA/1.8/
  distr/UBUNTU/24/
  distr/ALT/11/
 
Package/service identity is derived from config/rudb_version.conf:
PostgreSQL major selects rudb-19 package/service/path naming; RuDB product
version and build date select the package Version field.
 
ONNX Runtime (DBMS_VECTOR provider 'database')
==============================================
 
Optional feature.  Builds the vendored ONNX Runtime 1.31.0 source
(onnxruntime/) once, then links libonnxruntime.so into the server via
configure.  Without the flag DBMS_VECTOR keeps the REST-only behavior and
provider 'database' raises "local ONNX inference is not supported in this
build".
 
Bootstrap (once per build host; needs cmake >= 3.26, ninja, python3, patch,
and network or a mirror for the few deps ORT cannot take from packages):
 
  ./build_onnxruntime.sh                 # installs into $INSTALL_PATH
  PREFIX=/some/dir ./build_onnxruntime.sh
  SKIP_INSTALL=1 ./build_onnxruntime.sh  # build only
 
Recommended system dev packages so ORT uses them via find_package instead of
building from source (Debian/Ubuntu names; on Astra/Alt/RHEL use the distro
equivalents - re2, protobuf/abseil, eigen3, flatbuffers, nlohmann-json,
msgsl, boost headers, cpuinfo):
 
  protobuf-compiler libprotobuf-dev libabsl-dev libre2-dev libeigen3-dev
  libflatbuffers-dev nlohmann-json3-dev libmsgsl-dev libboost-dev
  libcpuinfo-dev
 
If the system protobuf/abseil versions conflict with onnx 1.22, remove those
packages: ORT then builds them from source via cmake FetchContent (network
required).
 
Configure with the runtime:
 
  ./configure ... --with-onnxruntime=DIR    # DIR = prefix with include/ lib/
  # or, when installed under the RuDB install prefix, just:
  ./configure ... --with-onnxruntime
  # or via the wrapper:
  WITH_ONNXRUNTIME=/opt/rudb-19 ./full_build.sh
 
libonnxruntime.so lands in the RuDB libdir, which the server rpath already
covers; target machines need a libstdc++/glibc not older than the build
host's.
 
Verify after a fresh cluster (cluster rebuild/creation is a manual step):
 
  select dbms_vector_onnx_enabled();        -- t on runtime builds
 
Models for provider 'database' must embed the tokenizer (a string input, as
produced by Olive-fused exports, Oracle 23ai parity); LOAD_ONNX_MODEL
validates that contract at load time.
 
The canonical engineering validation procedure remains
agent/docs/RUDB_PG19_PORT/06_BUILD_AND_VALIDATION_RUNBOOK.md.