-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from NEOS-AI/dev
Learn more details for better Postgres based search engine
- Loading branch information
Showing
6 changed files
with
17,488 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Electric | ||
|
||
[Electric](https://github.com/electric-sql/electric) is a Postgres sync engine. It does real-time partial replication of Postgres data into local apps and services. | ||
|
||
## Running Insturction | ||
|
||
### Docker | ||
|
||
```bash | ||
docker compose -f docker_compose/docker-compose.yml up | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: "3.3" | ||
name: "electric_example-${PROJECT_NAME:-default}" | ||
|
||
services: | ||
postgres: | ||
image: postgres:16-alpine | ||
environment: | ||
POSTGRES_DB: electric | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
ports: | ||
- 54321:5432 | ||
volumes: | ||
- ./postgres.conf:/etc/postgresql/postgresql.conf:ro | ||
tmpfs: | ||
- /var/lib/postgresql/data | ||
- /tmp | ||
command: | ||
- postgres | ||
- -c | ||
- config_file=/etc/postgresql/postgresql.conf | ||
|
||
backend: | ||
image: electricsql/electric:canary | ||
environment: | ||
DATABASE_URL: postgresql://postgres:password@postgres:5432/electric?sslmode=disable | ||
ports: | ||
- 3000:3000 | ||
build: | ||
context: ../packages/sync-service/ | ||
depends_on: | ||
- postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
listen_addresses = '*' | ||
wal_level = logical # minimal, replica, or logical |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Extract all stored procedures | ||
sudo docker exec paradedb psql -U postgres -d postgres -c " | ||
SELECT | ||
n.nspname as schema_name, | ||
p.proname as procedure_name, | ||
pg_get_functiondef(p.oid) as definition | ||
FROM pg_proc p | ||
INNER JOIN pg_namespace n ON p.pronamespace = n.oid | ||
WHERE n.nspname NOT IN ('pg_catalog', 'information_schema') | ||
AND p.prokind = 'f' -- Only select normal functions (not aggregate or window functions) | ||
ORDER BY schema_name, procedure_name;" > ./procedures_paradedb.sql |
Oops, something went wrong.