| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | Xuneng Zhou <xunengzhou(at)gmail(dot)com>, Kiran Kaki <itskkpg(at)gmail(dot)com> |
| Cc: | Rithvika Devisetti <devisettirithvika(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: WAIT FOR NO_THROW option could use some documentation |
| Date: | 2026-09-02 20:05:51 |
| Message-ID: | 7c60d54c-7640-43f5-8bbf-6df789406e6d@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 01.09.26 08:28, Xuneng Zhou wrote:
> 'NO_THROW' was added to make those statuses available for ordinary
> application control flow. Without it, 'timeout' and 'not in recovery'
> are raised as SQL errors. With it, they are returned as status values,
> allowing the application to retry, report replication lag, refresh its
> routing information, or direct a subsequent read to the primary. In
> that sense, 'NO_THROW' selects how these expected wait outcomes are
> reported: through the error channel or through the result row.
This just explains the technical distinction, not why it's needed.
Applications or client frameworks could just as well inspect an error
return with for example an appropriate error code. That's what they'd d
for any other command.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sami Imseih | 2026-09-02 20:12:30 | Re: PGQ catalog representation and pg_dump support |
| Previous Message | Heikki Linnakangas | 2026-09-02 19:42:05 | Re: auto-vectorize varbit bitwise operators |