Skip to content

Commit 1110dfb

Browse files
Update readme: building from source (#77)
Signed-off-by: Ahmet Gedemenli <[email protected]>
1 parent 697be05 commit 1110dfb

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

docs/building-from-source.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ brew install $USER/local-cmake/[email protected]
153153

154154
pg_lake is supported with PostgreSQL 16, 17 and 18.
155155

156+
You might need to configure Postgres with necessary args and flags. Below is an example for Postgres 18 on MacOS, with debugging flags and needed libraries:
157+
```
158+
./configure --prefix=$HOME/pgsql/18 --enable-cassert --enable-debug --enable-injection-points CFLAGS="-ggdb -O0 -fno-omit-frame-pointer" CPPFLAGS="-g -O0" --with-lz4 --with-icu --with-zstd --with-libxslt --with-libxml --with-readline --with-openssl --with-includes=/opt/homebrew/include/ --with-libraries=/opt/homebrew/lib PG_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
159+
```
160+
156161
To create a new PostgreSQL database directory, run initdb:
157162

158163
```bash
@@ -165,9 +170,9 @@ Success. You can now start the database server using:
165170
pg_ctl -D $HOME/pgsql/18/datastore -l logfile start
166171
```
167172

168-
To set up PgLake, you need to add `pg_extension_base` to shared_preload_libraries, which will load other modules as needed.
173+
To set up PgLake, you need to add `pg_extension_base` to `shared_preload_libraries`, which will load other modules as needed.
169174
```
170-
shared_preload_libraries = 'pg_extension_base'
175+
echo "shared_preload_libraries = 'pg_extension_base'" >> ~/<path_to_conf_file>/postgresql.conf
171176
```
172177

173178
### Using `pg_lake`
@@ -229,8 +234,9 @@ You need to follow below instructions to successfully run all tests locally:
229234

230235
- You need to install `pipenv` with >= python3.11 to run tests. Be careful to install correct python version if not exists e.g. ```apt install python3.11```. Then you should make sure you use it while creating pipenv environment. (e.g. ```pipenv --python 3.11```)
231236
- You need to have `pgaudit` extension installed
232-
- You need to install `jdk11` and `jdbc driver for Postgres`, then export `JDBC_DRIVER_PATH`. (required to run tests where we verify pg_lake_iceberg table results on spark)
237+
- You need to install `jdk21` and `jdbc driver for Postgres`, then export `JDBC_DRIVER_PATH`. (required to run tests where we verify pg_lake_iceberg table results on spark)
233238
- You need to have JAVA 21 (or higher) installed to run tests with Polaris catalog
239+
- You need to have `pg_cron` installed.
234240

235241
Build PostgreSQL from source:
236242

@@ -268,6 +274,14 @@ cd pgaudit
268274
make USE_PGXS=1 install
269275
```
270276

277+
Build pg_cron:
278+
279+
```bash
280+
git clone https://github.com/citusdata/pg_cron.git
281+
cd pg_cron
282+
make install
283+
```
284+
271285
Azure tests use azurite, which needs to be installed via npm.
272286

273287
```bash
@@ -344,9 +358,11 @@ We have so far avoided regular SQL regression tests. The reason is that we found
344358

345359
2. **Start the `minio` Server**:
346360
```bash
347-
minio server start
361+
minio server /tmp/data
348362
```
349363

364+
To remove leftovers from the previous run if needed, you can first run: `rm -rf /tmp/data`
365+
350366
3. **Access `minio` UI**:
351367
Open your browser and go to [http://localhost:9000/](http://localhost:9000/).
352368

@@ -365,6 +381,8 @@ We use the following for simplicity:
365381
[profile minio]
366382
region = us-east-1
367383
services = testing-minio
384+
aws_access_key_id = testkey
385+
aws_secret_access_key = testpassword
368386
```
369387

370388
6. **Create a Bucket in `minio` UI**:

0 commit comments

Comments
 (0)