Re: SIGSEGV from START_REPLICATION 0/XXXXXXX in XLogSendPhysical () at walsender.c:2762

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Michael Paquier <michael@paquier.xyz>, Fujii Masao <masao.fujii@oss.nttdata.com>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, sitnikov.vladimir@gmail.com, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-06-04T22:51:08Z
Lists: pgsql-hackers
Hi,

On 2020-06-04 16:44:53 -0400, Alvaro Herrera wrote:
> A logical replication connection cannot run SQL anyway, can it?

You can:

andres@awork3:~/src/postgresql$ psql 'replication=database'

postgres[52656][1]=# IDENTIFY_SYSTEM;
┌─────────────────────┬──────────┬────────────┬──────────┐
│      systemid       │ timeline │  xlogpos   │  dbname  │
├─────────────────────┼──────────┼────────────┼──────────┤
│ 6821634567571961151 │        1 │ 1/D256EC40 │ postgres │
└─────────────────────┴──────────┴────────────┴──────────┘
(1 row)

postgres[52656][1]=# SELECT 1;
┌──────────┐
│ ?column? │
├──────────┤
│        1 │
└──────────┘
(1 row)


I am very much not in love with the way that was implemented, but it's
there, and it's used as far as I know (cf tablesync.c).

Greetings,

Andres Freund



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix crash in WAL sender when starting physical replication

  2. Add a SHOW command to the replication command language.