1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00
pgbackrest/lib/pgBackRest/Protocol
David Steele 7d8068f27b Don't decode manifest data when it is generated on a remote.
Decoding a manifest from the JSON provided by C to the hash required by Perl is an expensive process.  If manifest() was called on a remote it was being decoded into a hash and then immediately re-encoded into JSON for transmission over the protocol layer.

Instead, provide a function for the remote to get the raw JSON which can be transmitted as is and decoded in the calling process instead.

This makes remote manifest calls as fast as they were before 2.16, but local calls must still pay the decoding penalty and are therefore slower.  This will continue to be true until the Perl storage interface is retired at the end of the C migration.

Note that for reasonable numbers of tables there is no detectable difference.  The case in question involved 250K tables with a 10 minute decode time (which was being doubled) on a fast workstation.
2019-09-03 12:30:45 -04:00
..
Base The local command for restore is implemented entirely in C. 2019-05-20 17:07:37 -04:00
Command Perl error handler recognizes errors thrown from the C library. 2017-10-16 10:47:31 -04:00
Local Fix comment typos. 2019-08-26 12:05:36 -04:00
Remote Don't decode manifest data when it is generated on a remote. 2019-09-03 12:30:45 -04:00
Storage Don't decode manifest data when it is generated on a remote. 2019-09-03 12:30:45 -04:00
Helper.pm Remove dead code missed in 1b486847. 2019-05-08 18:58:07 -04:00