-
Notifications
You must be signed in to change notification settings - Fork 178
postgres_fdw: add missing test files and fix regression tests #1190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
roseduan
wants to merge
1
commit into
apache:main
Choose a base branch
from
roseduan:add_postgres_fdw_test_script
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
1,034 changes: 525 additions & 509 deletions
1,034
contrib/postgres_fdw/expected/gp2pg_postgres_fdw_optimizer.out
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,62 @@ | ||
#!/bin/bash | ||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
if [ ! -d testdata ]; then | ||
mkdir testdata | ||
fi | ||
pushd ${DIR}/testdata | ||
GPPORT=${PGPORT} | ||
GPOPTIONS=${PGOPTIONS} | ||
export PGPORT=${PG_PORT} | ||
# set PGOPTIONS to be empty and restart the GP. | ||
# Becuase PGOPTIONS='-c optimizer=off' is sometimes set on gp cluster | ||
# and it will be sent to pg through postgres_fdw, but pg can not | ||
# recognize the 'optimizer' config. PGOPTIONS is not useful for gp | ||
# cluster, it is used by psql. | ||
export PGOPTIONS='' | ||
pgbin="pgsql" | ||
|
||
# install postgres | ||
if [ ! -d "${pgbin}" ] ; then | ||
mkdir ${pgbin} | ||
if [ ! -d postgresql-14.4 ]; then | ||
wget https://ftp.postgresql.org/pub/source/v14.4/postgresql-14.4.tar.gz | ||
tar -xf postgresql-14.4.tar.gz | ||
fi | ||
pushd postgresql-14.4 | ||
./configure --prefix=${DIR}/testdata/${pgbin} | ||
make -sj$(nproc) MAKELEVEL=0 install | ||
rm -rf postgresql-14.4.tar.gz | ||
popd | ||
fi | ||
|
||
# start postgres 1 | ||
# there may be already a postgres postgres running, anyway, stop it | ||
if [ -d "pgdata" ] ; then | ||
${pgbin}/bin/pg_ctl -D pgdata stop || true | ||
rm -r pgdata | ||
fi | ||
${pgbin}/bin/initdb -D pgdata | ||
${pgbin}/bin/pg_ctl -D pgdata -l pglog start | ||
|
||
# init postgres 1 | ||
${pgbin}/bin/dropdb --if-exists contrib_regression | ||
${pgbin}/bin/createdb contrib_regression | ||
|
||
# start postgres 2 | ||
# listening to port 5555 | ||
# there may be already a postgres postgres running, anyway, stop it | ||
if [ -d "pgdata2" ] ; then | ||
${pgbin}/bin/pg_ctl -D pgdata2 stop || true | ||
rm -r pgdata2 | ||
fi | ||
${pgbin}/bin/initdb -D pgdata2 | ||
${pgbin}/bin/pg_ctl -D pgdata2 -l pglog2 -o "-p 5555" start | ||
|
||
# init postgres 2 | ||
${pgbin}/bin/dropdb -p 5555 --if-exists contrib_regression | ||
${pgbin}/bin/createdb -p 5555 contrib_regression | ||
|
||
export PGPORT=${GPPORT} | ||
# export PGOPTIONS=${GPOPTIONS} | ||
popd | ||
gpstop -ar |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look 667f0c3