Re: pgsql: postgres_fdw: reestablish new connection if cached one is detect

2020-10-08 Thread Tom Lane
Fujii Masao writes: >> Therefore, the easy fix is to make libpq mark the connection as >> CONNECTION_BAD even in ECONNABORTED, like we do in ECONNRESET. > Patch attached. This patch also changes errcode_for_socket_access() > so that it uses ERRCODE_CONNECTION_FAILURE rather than > ERRCODE_INTERNA

pgsql: Avoid gratuitous inaccuracy in numeric width_bucket().

2020-10-08 Thread Tom Lane
Avoid gratuitous inaccuracy in numeric width_bucket(). Multiply before dividing, not the reverse, so that cases that should produce exact results do produce exact results. (width_bucket_float8 got this right already.) Even when the result is inexact, this avoids making it more inexact, since onl

pgsql: Fix numeric width_bucket() to allow its first argument to be inf

2020-10-08 Thread Tom Lane
Fix numeric width_bucket() to allow its first argument to be infinite. While the calculation is not well-defined if the bounds arguments are infinite, there is a perfectly sane outcome if the test operand is infinite: it's just like any other value that's before the first bucket or after the last

Re: pgsql: postgres_fdw: reestablish new connection if cached one is detect

2020-10-08 Thread Tom Lane
I wrote: > I've not checked your patch in detail. Bread crumb for the archives: I started a -hackers thread about this: https://www.postgresql.org/message-id/flat/2621622.1602184554%40sss.pgh.pa.us regards, tom lane

pgsql: Fix typos in logical.c and reorderbuffer.c.

2020-10-08 Thread Amit Kapila
Fix typos in logical.c and reorderbuffer.c. Reviewed-by: Sawada Masahiko Discussion: https://postgr.es/m/CAA4eK1K6zTpuqf_d7wXCBjo_EF0_B6Fz3Ecp71Vq18t=wg-...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f13f2e484172a1c865cd067796cee3568467dd51 Mo