Re: How to redirect output from PostgreSQL pg_recvlogical to a file or a pipe?

From: Jim Nasby <jim(dot)nasby(at)gmail(dot)com>
To: David Ventimiglia <davidaventimiglia(at)hasura(dot)io>, Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to redirect output from PostgreSQL pg_recvlogical to a file or a pipe?
Date: 2024-01-16 18:57:14
Message-ID: b9da20e6-f279-4c04-897a-c4e5ed716740@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/13/24 3:34 PM, David Ventimiglia wrote:
> The business problem I'm trying to solve is:
>
> "How do I capture logical decoding events with the wal2json output
> encoder, filter them with jq, and pipe them to psql, using pg_recvlogical?"

I think the missing piece here is that you can't simply pipe JSON into
psql and expect anything useful to happen. Are you using jq to turn the
JSON into actual SQL statements? What does some of your jq output look like?
--
Jim Nasby, Data Architect, Austin TX

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Ventimiglia 2024-01-16 19:15:20 Re: How to redirect output from PostgreSQL pg_recvlogical to a file or a pipe?
Previous Message Yongye Serkfem 2024-01-16 18:55:20 pg_dump Running Slow