Skip to content

Anpo13211/Athena_PG

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56,716 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Athena_PG

This is the repository of Athena_PG which implments the order-centric plan explorer of Athena.

Dependencies

apt-get update

apt-get install -y wget unzip build-essential pkg-config libicu-dev libreadline-dev libz-dev bison flex gosu locales

Build

1. Build Postgres

# configure pg
./configure --prefix=<set you dir for postgres>/pg 

# build
make -j "$(nproc)" install 

# add system path
echo 'export PATH="$PATH:/<you dir for postgres>/pg/bin"' >> ~/.bashrc
source ~/.bashrc

# enter pg dir
cd <you dir for postgres>/pg

# init postgres data dir
initdb -D data

# start postgres
pg_ctl -D data -l logfile start

# connect to postgres
psql postgres

2. Build pg_prewarm

cd contrib/pg_prewarm

make install

3. Build pg_hint_plan

wget -O REL16_1_6_1.tar.gz "https://github.com/ossc-db/pg_hint_plan/archive/refs/tags/REL16_1_6_1.tar.gz"

tar -zxvf REL16_1_6_1.tar.gz

cd pg_hint_plan-REL16_1_6_1/

# you need to modify the line 4 of file SPECS/pg_hint_plan16.spec
"%define _pgdir   /usr/pgsql-16" => "%define _pgdir   <you dir for postgres>/pg"

make install

4. Modify configurations

# postgresql.conf
shared_preload_libraries = 'pg_prewarm, pg_hint_plan'

5. Load pg_prewarm and pg_hint_plan

# connect to postgres
psql postgres

postgres=# LOAD 'pg_hint_plan';
postgres=# CREATE EXTENSION pg_prewarm;

About

Athena_PG which corresponds PG18.1 (with other additional features)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 84.9%
  • PLpgSQL 6.4%
  • Perl 3.9%
  • Yacc 1.3%
  • Python 0.7%
  • Makefile 0.7%
  • Other 2.1%