Re: Logical Replication WIP - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Logical Replication WIP
Date
Msg-id 3042dda1-0ff8-bb7c-991f-d14f9a10dc95@2ndquadrant.com
Whole thread Raw
In response to Re: Logical Replication WIP  (Petr Jelinek <petr@2ndquadrant.com>)
List pgsql-hackers
Review of 0004-Make-libpqwalreceiver-reentrant.patch:

This looks like a good change.

typo: _PG_walreceirver_conn_init

For libpqrcv_create_slot(), slotname should be const char *.
Similarly, for slotname in libpqrcv_startstreaming*() and conninfo in
libpqrcv_connect(). (the latter two pre-existing)

The connection handle should record in libpqrcv_connect() whether a
connection is a logical or physical replication stream.  Then that
parameter doesn't have to be passed around later (or at least some
asserts could double-check it).

In libpqrcv_connect(), the new argument connname is actually just the
application name, for which in later patches the subscription name is
passed in.  Does this have a deeper meaning, or should we call the
argument appname to avoid introducing another term?

New function libpqrcv_create_slot(): Hardcoded cmd length (hmm, other
functions do that too), should used StringInfo.  ereport instead of
elog.  No newline at the end of error message, since PQerrorMessage()
already supplies it.  Typo "could not crate".  Briefly document return
value.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Mattia
Date:
Subject: Allow to_date() and to_timestamp() to accept localized month names
Next
From: Craig Ringer
Date:
Subject: Re: pg_basebackup, pg_receivexlog and data durability (was: silent data loss with ext4 / all current versions)