Re: Question regarding Sync message and unnamed portal
От | Tom Lane |
---|---|
Тема | Re: Question regarding Sync message and unnamed portal |
Дата | |
Msg-id | 25298.1349105841@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Question regarding Sync message and unnamed portal (Tatsuo Ishii <ishii@postgresql.org>) |
Список | pgsql-hackers |
Tatsuo Ishii <ishii@postgresql.org> writes: >> The right thing to use if you're trying to interleave portal executions >> like that is Flush, not Sync. Sync mainly adds a protocol >> resynchronization point --- it's needed in case portal execution fails >> partway through. (In which case you'll have lost both portals in the >> transaction abort anyway.) > Thanks for the suggestion. However, problem with using Flush is, > backend never sends "Ready for Query" until Sync is sent. For frontend > program "Ready for query" is important because 1) client knows session > state, 2) "Ready for query" is a command boundary as stated in > document. [ shrug... ] RFQ is an acknowledgement of a sync point. It's useful for clients that are too lazy to keep track of the protocol state in great detail --- but if you're trying to interleave execution of two portals, you need to keep track. regards, tom lane
В списке pgsql-hackers по дате отправления: