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

(JP) bytea型を含むテーブルでソートを行うと、エラーで実行できないことがある #27

Closed
taiki-k opened this issue Jun 3, 2014 · 2 comments
Labels
bug developer confirmed the steps to reproduce the problem, and does not work as expected

Comments

@taiki-k
Copy link
Contributor

taiki-k commented Jun 3, 2014

bytea型を含むテーブルにおいて、ソートを含むSQL文を発行すると、エラーとなり実行できないことがあります。
pg_strom.soを読み込まない状態では実行できるので、PG-Stromでの問題ではないかと思います。

  • 実行したSQL
SELECT * FROM bytea_test WHERE bin BETWEEN '\xff00'::bytea AND '\xffff'::bytea ORDER BY id;
SELECT * FROM bytea_test2 WHERE bin BETWEEN '\xff00'::bytea AND '\xffff'::bytea ORDER BY id;
  • エラーメッセージ
ERROR:  unrecognized node type: 221
  • 対象のテーブル
  Table "public.bytea_test"
 Column |  Type  | Modifiers
--------+--------+-----------
 id     | bigint | not null
 bin    | bytea  |
Indexes:
    "bytea_test_pkey" PRIMARY KEY, btree (id)

  Table "public.bytea_test2"
 Column |  Type   | Modifiers
--------+---------+-----------
 id     | integer | not null
 bin    | bytea   |
Indexes:
    "bytea_test2_pkey" PRIMARY KEY, btree (id)

なお、以下の条件のいずれかにあてはまると再現しません。

  • GpuScanを使用しない場合。
  • ORDER BY句がbinの場合
  • ORDER BY句がない(ソートを行わない)場合
  • 検索対象がidかbinのいずれか片方の場合
@kaigai
Copy link
Contributor

kaigai commented Jun 3, 2014

GpuScanの結果をバルクでGpuSortに渡す部分の問題で、MultiExecCustomPlan を呼び出す
部分のパッチ当て忘れでした。
すいませんが、PostgreSQL本体側をリフレッシュして再現確認をお願いします。

カラムデータでの受け渡しは今日これからの開発なので、一時的に tcache_get_tchead() が
常にNULLを返す(キャッシュを使わない)にしています。

@taiki-k
Copy link
Contributor Author

taiki-k commented Jun 4, 2014

PostgreSQL本体を最新版にして再現確認をしたところ、エラーは発生しなくなりましたが、 #29 が発生するようになりました。
別問題のように見えますので、こちらは修正されたものと判断します。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug developer confirmed the steps to reproduce the problem, and does not work as expected
Projects
None yet
Development

No branches or pull requests

2 participants