pgsql: Implement List support for TransactionId

2022-07-04 Thread Alvaro Herrera
Implement List support for TransactionId Use it for RelationSyncEntry->streamed_txns, which is currently using an integer list. The API support is not complete, not because it is hard to write but because it's unclear that it's worth the code space, there being so little use of XID lists. Discus

pgsql: Refactor sending of RowDescription messages in replication proto

2022-07-04 Thread Peter Eisentraut
Refactor sending of RowDescription messages in replication protocol Some routines open-coded the construction of RowDescription messages. Instead, we have support for doing this using tuple descriptors and DestRemoteSimple, so use that instead. Reviewed-by: Nathan Bossart Discussion: https://ww

Re: pgsql: Change timeline field of IDENTIFY_SYSTEM to int8

2022-07-04 Thread Michael Paquier
On Mon, Jul 04, 2022 at 01:55:13AM -0400, Tom Lane wrote: > Peter Eisentraut writes: > > Change timeline field of IDENTIFY_SYSTEM to int8 > > Surely this patch is far from complete? Yeah.. > But what about whatever code is reading the output? And what if > that code isn't v16? I can't believe

pgsql: Replace durable_rename_excl() by durable_rename(), take two

2022-07-04 Thread Michael Paquier
Replace durable_rename_excl() by durable_rename(), take two durable_rename_excl() attempts to avoid overwriting any existing files by using link() and unlink(), and it falls back to rename() on some platforms (aka WIN32), which offers no such overwrite protection. Most callers use durable_rename_

pgsql: Remove durable_rename_excl()

2022-07-04 Thread Michael Paquier
Remove durable_rename_excl() A previous commit replaced all the calls to this function with durable_rename() as of dac1ff3, making it used nowhere in the tree. Using it in extension code is also risky based on the issues described in this previous commit, so let's remove it. This makes possible t

pgsql: Add result_types column to pg_prepared_statements view

2022-07-04 Thread Peter Eisentraut
Add result_types column to pg_prepared_statements view Containing the types of the columns returned by the prepared statement. Prompted by question from IRC user mlvzk. Author: Dagfinn Ilmari MannsÃ¥ker Discussion: https://www.postgresql.org/message-id/flat/[email protected] Bra