Skip to content
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

[YSQL] Failing test: TestPgRegressContribPostgresFdw #24296

Open
1 task done
sushantrmishra opened this issue Oct 6, 2024 · 0 comments
Open
1 task done

[YSQL] Failing test: TestPgRegressContribPostgresFdw #24296

sushantrmishra opened this issue Oct 6, 2024 · 0 comments
Assignees
Labels
2025.1.0_blocker area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/high High Priority

Comments

@sushantrmishra
Copy link

sushantrmishra commented Oct 6, 2024

Jira Link: DB-13185

Description

https://detective-gcp.dev.yugabyte.com/stability/test?analyze_trends=true&branch=master&class=org.yb.pgsql.TestPgRegressContribPostgresFdw&name=schedule

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@sushantrmishra sushantrmishra added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Oct 6, 2024
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Oct 6, 2024
@sushantrmishra sushantrmishra removed kind/bug This issue is a bug priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage labels Oct 6, 2024
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Nov 5, 2024
@m-iancu m-iancu self-assigned this Nov 13, 2024
timothy-e added a commit that referenced this issue Dec 5, 2024
Summary:
TestPgRegressContribPostgresFdw has been failing since the pg15 merge (eac5ed5).

To avoid wasting time on a test that we know will fail, just disable it for now until we can properly fix it (#24296).
Jira: DB-14321

Test Plan:
Jenkins: test regex: .*TestPgRegressContribPostgresFdw.*

```
 ./yb_build.sh --java-test TestPgRegressContribPostgresFdw
```

```
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.yb.pgsql.TestPgRegressContribPostgresFdw
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.74 s - in org.yb.pgsql.TestPgRegressContribPostgresFdw
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.406 s
[INFO] Finished at: 2024-12-03T20:03:41Z
[INFO] ------------------------------------------------------------------------
```

Reviewers: smishra, kramanathan, jason

Reviewed By: jason

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D40441
@yugabyte-ci yugabyte-ci added priority/high High Priority and removed priority/medium Medium priority issue labels Dec 5, 2024
vaibhav-yb pushed a commit to vaibhav-yb/yugabyte-db that referenced this issue Dec 10, 2024
Summary:
TestPgRegressContribPostgresFdw has been failing since the pg15 merge (eac5ed5).

To avoid wasting time on a test that we know will fail, just disable it for now until we can properly fix it (yugabyte#24296).
Jira: DB-14321

Test Plan:
Jenkins: test regex: .*TestPgRegressContribPostgresFdw.*

```
 ./yb_build.sh --java-test TestPgRegressContribPostgresFdw
```

```
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.yb.pgsql.TestPgRegressContribPostgresFdw
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.74 s - in org.yb.pgsql.TestPgRegressContribPostgresFdw
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.406 s
[INFO] Finished at: 2024-12-03T20:03:41Z
[INFO] ------------------------------------------------------------------------
```

Reviewers: smishra, kramanathan, jason

Reviewed By: jason

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D40441
karthik-ramanathan-3006 added a commit that referenced this issue Jan 2, 2025
Summary:
Upstream postgres introduced several changes/improvements to postgres_fdw between PG 11 and PG 15
which have resulted in changes to the output of its corresponding regress test.

This revision refreshes the output of the YB version of this test (`yb_pg_postgres_fdw.*`) according to these upstream Postgres changes.
Differences in output introduced by YB changes are left unchanged in this revision.
New tests introduced by upstream Postgres between versions 11 and 15 are not imported by this revision.

The upstream postgres commits of relevant FDW changes are listed below:
- Support for pushing down plan nodes such as LockRow, Sort, Limit to the remote server.
   - `d50d172e517c1d2aabff3ceb3ad3113b909c5017`: postgres_fdw: Perform the (FINAL, NULL) upperrel operations remotely.
- Changes to EXPLAIN output to make postgres_fdw EXPLAIN plans more consistent with local server.
   - `f8abb0f5e114d8c309239f0faa277b97f696d829`: postgres_fdw: suppress casts on constants in limited cases.
   - `4526951d564a7eed512b4a0ac3b5893e0a115690`: Make postgres_fdw's "Relations" output agree with the rest of EXPLAIN.
   - `6ef77cf46e81f45716ec981cb08781d426181378`: Further adjust EXPLAIN's choices of table alias names.
   - `bf39b3af6a9c6a036aae0742cf339fce662eee3a`: Further sync postgres_fdw's "Relations" output with the rest of EXPLAIN.
- Support for Bulk INSERTs in postgres_fdw.
   - `b663a4136331de6c7364226e3dbf7c88bfee7145`: Implement support for bulk inserts in postgres_fdw
- Consistency in error messages for "invalid input syntax" errors
   - `3522d0eaba5a976f09a48810dd25dff6ab3565df`: Deduplicate "invalid input syntax" messages for various types.
- Removed support for the option 'SET WITH OIDS' in creating/altering a table
   - `578b229718e8f15fa779e20f086c4b6bb3776106`: Remove WITH OIDS support, change oid catalog column visibility.
- Removed support for factorial operator
   - `76f412ab310554acb970a0b73c8d1f37f35548c6`: Remove factorial operators, leaving only the factorial() function.

Miscellaneous changes:
 - A query that attempted to move a row in a partitioned table across servers is now correctly disallowed.
   Previously, the execution of the query failed with a different error.
 - A query that previously picked a plan with a 'Hash Join' now opts for a more optimized 'Hash Semi Join' plan.

**Next steps (in future revisions)**
 - Fix YB introduced output changes.
   - Some changes are cosmetic, some changes may require code fixes.
 - Import delta of postgres_fdw tests introduced between PG 11 and PG 15.
   - This payload was not added to this revision because 1) Large volume of tests 2) Tests are interleaved among existing tests which would make reviewing objectively hard.
 - Re-enable TestPgRegressContribPostgresFdw java test.
Jira: DB-13185

Test Plan:
Skipping Jenkins as the underlying test is disabled.
Jenkins: skip

Reviewers: telgersma, fizaa

Reviewed By: telgersma

Subscribers: jason, yql

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D40834
karthik-ramanathan-3006 added a commit that referenced this issue Jan 10, 2025
…re-enable test (Part 2)

Summary:
D40834 refreshed the output of `yb_pg_postgres_fdw.*` in accordance to changes introduced by upstream Postgres between PG 11 and PG 15.

This revision accounts for the following YB changes which necessitate a change in output:
 - D39066 changed the error message of failed "ALTER <TABLE/SEQUENCE/INDEX>" commands
 - D40786 changed the error message for FDW queries which specified system columns to begin with a lowercase character.
 - The ordering of rows returned by SELECT and RETURNING queries without an ORDER BY changed as a result of moving to PG 15. This revision
    modifies such queries to explicitly include an ORDER BY. The ordering is chosen in such a way as to match the output of PG as closely as possible.

Further, this change:
 - Enables about 30 instances of EXPLAIN queries that were previously commented out. It is unclear why this was done in the first place.
   The plans produced by the EXPLAIN statements in each of these instances is identical to those produced by vanilla Postgres.
     - These EXPLAIN statements (which did not execute the query) were followed by the actual statement to be executed (ie. `EXPLAIN SELECT ...` is followed by `SELECT ...`).
     - In some of these instances, the statement following the EXPLAIN had an ORDER BY clause that was added by D15592 for reasons mentioned above.
     - This revision does NOT add a corresponding ORDER BY to the preceding EXPLAIN statement.
     - Rationale: The EXPLAIN plans is to be compared with that of vanilla postgres. Adding a Sort node to the plan just adds unnecessary noise ... and we know that sorting (as a planning step) works in postgres_fdw.
 - Re-indents queries whose indentation was lost in D15592. The purpose of this change is to reduce noise when merging in future versions of postgres_fdw.sql (including the PG 15 version).
 - Enables a few instances of CREATE TABLE <new-table> (LIKE <old-table>) queries.

Even after this exercise, there are over 150 differences between this test in vanilla postgres and this revision. Most of the differences fall into one of these buckets:
 - YB note comments indicating a difference in behavior between vanilla postgres and Yugabyte.
 - Commenting out unsupported behavior such as table inheritance, some variations of ALTER TABLE etc
 - Modifications to queries to workaround Yugabyte restrictions, such as a lack of support for options like `use_remote_estimate`
   (The workaround for this, in particular, is to change all instances of the relation "ft2" to "ft1", which would in turn cause minor differences in query output)

**Next steps (in future revisions)**
 - Import delta of postgres_fdw tests introduced between PG 11 and PG 15.
     - This payload was not added to this revision because 1) Large volume of tests 2) Tests are interleaved among existing tests which would make reviewing objectively hard.

Jira: DB-13185

Test Plan:
Run the following test:
```
./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressContribPostgresFdw#schedule'
```

Reviewers: telgersma, fizaa

Reviewed By: telgersma

Subscribers: yql

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D41010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2025.1.0_blocker area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/high High Priority
Projects
None yet
Development

No branches or pull requests

4 participants