Re: pipe_read_line for reading arbitrary strings

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-05-17T11:49:54Z
Lists: pgsql-hackers

Attachments

> On 7 Mar 2023, at 23:05, Daniel Gustafsson <daniel@yesql.se> wrote:
> 
> When skimming through pg_rewind during a small review I noticed the use of
> pipe_read_line for reading arbitrary data from a pipe, the mechanics of which
> seemed odd.

A rebase of this for the CFBot since I realized I had forgotten to add this to
the July CF.

--
Daniel Gustafsson

Commits

  1. Fix errorhandling for reading from a pipe

  2. Refactor pipe_read_line to return the full line

  3. Add -c/--restore-target-wal to pg_rewind

  4. Here is a patch that fixes the pipes used in find_other_exec() when