-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the timescaledb extension. (#849)
This extension requires specific pre and post pg_restore steps to be implemented, and also seems to require pgcopydb to use a superuser role to be able to fetch the data and use pg_dump. Co-authored-by: Aditi Kesarwani <[email protected]> Co-authored-by: VaibhaveS <[email protected]> Co-authored-by: Arunprasad Rajkumar <[email protected]>
- Loading branch information
1 parent
64ca602
commit 6bdcbee
Showing
14 changed files
with
10,456 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
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
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
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
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 @@ | ||
FROM pagila | ||
|
||
WORKDIR /usr/src/pgcopydb | ||
|
||
COPY ./copydb.sh copydb.sh | ||
COPY ./rides.sql rides.sql | ||
COPY ./fares.sql fares.sql | ||
COPY ./nyc_data_rides.10k.csv nyc_data_rides.10k.csv | ||
|
||
USER docker | ||
CMD ["/usr/src/pgcopydb/copydb.sh"] |
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,20 @@ | ||
# Copyright (c) 2021 The PostgreSQL Global Development Group. | ||
# Licensed under the PostgreSQL License. | ||
|
||
COMPOSE_EXIT = --exit-code-from=test --abort-on-container-exit | ||
|
||
test: down run down ; | ||
|
||
up: down build | ||
docker compose up $(COMPOSE_EXIT) | ||
|
||
run: build | ||
docker compose run test | ||
|
||
down: | ||
docker compose down | ||
|
||
build: | ||
docker compose build --quiet | ||
|
||
.PHONY: run down build test |
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,27 @@ | ||
services: | ||
source: | ||
image: timescale/timescaledb:latest-pg13 | ||
expose: | ||
- 5432 | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: h4ckm3 | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
target: | ||
image: timescale/timescaledb:latest-pg13 | ||
expose: | ||
- 5432 | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: h4ckm3 | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
test: | ||
build: . | ||
environment: | ||
PGCOPYDB_SOURCE_PGURI: postgres://postgres:h4ckm3@source/postgres | ||
PGCOPYDB_TARGET_PGURI: postgres://postgres:h4ckm3@target/postgres | ||
PGCOPYDB_TABLE_JOBS: 4 | ||
PGCOPYDB_INDEX_JOBS: 2 | ||
depends_on: | ||
- source | ||
- target |
Oops, something went wrong.