payload: {"action":"opened","issue":{"url":"https://api.github.com/repos/OnizukaLab/dejima-prototype/issues/1","repository_url":"https://api.github.com/repos/OnizukaLab/dejima-prototype","labels_url":"https://api.github.com/repos/OnizukaLab/dejima-prototype/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/OnizukaLab/dejima-prototype/issues/1/comments","events_url":"https://api.github.com/repos/OnizukaLab/dejima-prototype/issues/1/events","html_url":"https://github.com/OnizukaLab/dejima-prototype/issues/1","id":431954248,"node_id":"MDU6SXNzdWU0MzE5NTQyNDg=","number":1,"title":"send SQL directly from client to proxy","user":{"login":"Y-Wakuta","id":21016298,"node_id":"MDQ6VXNlcjIxMDE2Mjk4","avatar_url":"https://avatars3.githubusercontent.com/u/21016298?v=4","gravatar_id":"","url":"https://api.github.com/users/Y-Wakuta","html_url":"https://github.com/Y-Wakuta","followers_url":"https://api.github.com/users/Y-Wakuta/followers","following_url":"https://api.github.com/users/Y-Wakuta/following{/other_user}","gists_url":"https://api.github.com/users/Y-Wakuta/gists{/gist_id}","starred_url":"https://api.github.com/users/Y-Wakuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Y-Wakuta/subscriptions","organizations_url":"https://api.github.com/users/Y-Wakuta/orgs","repos_url":"https://api.github.com/users/Y-Wakuta/repos","events_url":"https://api.github.com/users/Y-Wakuta/events{/privacy}","received_events_url":"https://api.github.com/users/Y-Wakuta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-04-11T10:43:51Z","updated_at":"2019-04-11T10:43:51Z","closed_at":null,"author_association":"NONE","body":"## 背景\r\n\r\n現在の実装ではclientからDBサーバにSQLを送ってtriggerでproxyにupdate履歴を送信している。しかし、SELECTではPostgreSQL はtriggerを貼ることができない。そのため、SELECTの結果を取得することができず、分散トランザクションの制御においてレコード単位のロックをかけることができない。\r\n\r\n## 対策\r\n\r\n以下の4種類を順に試す\r\n1. ベーステーブルへのSELECTに対してCREATE RULEでproxyへのレコードに関する情報を飛ばせないか確認する\r\n2. temporary table+trigger\r\n3. ノーマルのテーブル+trigger\r\n4. dennisさんの通信順序変更案\r\n      `client -SQL->dbs -diff by trigger->proxy` ではなく `client -SQL-> proxy -SQL->dbs->proxy`でproxyにSELECT句が合ったことを通知する\r\n"}}
other: {"actor":{"display_login":"Y-Wakuta"}}