1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +02:00

Remove remote lock requirements for the archive-get, restore, info, and check commands since they are read-only operations.

Suggested by Michael Vitale.
This commit is contained in:
David Steele 2017-02-02 20:42:45 -05:00
parent 3e54aad88f
commit efdf64506a
2 changed files with 14 additions and 2 deletions

View File

@ -84,8 +84,12 @@ local $EVAL_ERROR = undef; eval
optionGet(OPTION_PROTOCOL_TIMEOUT)
);
# Acquire a remote lock
lockAcquire(optionGet(OPTION_COMMAND), undef, true, optionGet(OPTION_PROCESS, false));
# Acquire a remote lock (except for commands that are read-only)
if (!(optionTest(OPTION_COMMAND, CMD_ARCHIVE_GET) || optionTest(OPTION_COMMAND, CMD_INFO) ||
optionTest(OPTION_COMMAND, CMD_RESTORE) || optionTest(OPTION_COMMAND, CMD_CHECK)))
{
lockAcquire(optionGet(OPTION_COMMAND), undef, true, optionGet(OPTION_PROCESS, false));
}
# Process remote requests
exitSafe($oRemote->process());

View File

@ -214,6 +214,14 @@
<p>Added warning to update <code>pg_tablespace.spclocation</code> when remapping tablespaces in <postgres/> &lt; 9.2.</p>
</release-item>
<release-item>
<release-item-contributor-list>
<release-item-ideator id="vitale.michael"/>
</release-item-contributor-list>
<p>Remove remote lock requirements for the <cmd>archive-get</cmd>, <cmd>restore</cmd>, <cmd>info</cmd>, and <cmd>check</cmd> commands since they are read-only operations.</p>
</release-item>
</release-feature-list>
<release-refactor-list>