RE: Allow logical replication to copy tables in binary format
Takamichi Osumi (Fujitsu) <osumi.takamichi@fujitsu.com>
From: "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>
To: 'Melih Mutlu' <m.melihmutlu@gmail.com>, Euler Taveira <euler@eulerto.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-09-22T03:22:04Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow logical replication to copy tables in binary format.
- ecb696527c01 16.0 landed
-
Common function for percent placeholder replacement
- c96de2ce1782 16.0 cited
-
Doc: add XML ID attributes to <sectN> and <varlistentry> tags.
- 78ee60ed84bb 16.0 cited
-
Re-order disable_on_error in tab-complete.
- d547f7cf5efc 16.0 cited
-
Make subscription tests pass with log_error_verbosity=verbose
- 19408aae7fa2 15.0 cited
-
Weaken type-OID-matching checks in array_recv and record_recv.
- 670c0a1d474b 14.0 cited
-
Allow logical replication to transfer data in binary format.
- 9de77b545313 14.0 cited
Hi Few more minor comments. On Tuesday, August 16, 2022 2:04 AM Melih Mutlu <m.melihmutlu@gmail.com> wrote: > > > My main concern is to break a scenario that was previously working (14 > -> 15) but after a subscriber upgrade > it won't (14 -> 16). > > Fair concern. Some cases that might break the logical replication with version > upgrade would be: ... > 3- Copying in binary format would work with the same schemas. Currently, > logical replication does not require the exact same schemas in publisher and > subscriber. > This is an additional restriction that comes with the COPY command. > > If a logical replication has been set up with different schemas and subscription > is created with the binary option, then yes this would break things. > This restriction can be clearly stated and wouldn't be unexpected though. > > I'm also okay with allowing binary copy only for v16 or later, if you think it would > be safer and no one disagrees with that. > What are your thoughts? I agree with the direction to support binary copy for v16 and later. IIUC, the binary format replication with different data types fails even during apply phase on HEAD. I thought that means, the upgrade concern only applies to a scenario that the user executes only initial table synchronizations between the publisher and subscriber and doesn't replicate any data at apply phase after that. I would say this isn't a valid scenario and your proposal makes sense. Best Regards, Takamichi Osumi