我已通过Streaming Replication设置了Postgres Hot Standby服务器。但我的备用服务器要求旧的wal存档日志,该日志当前不在Master的pg_xlog目录中。但该文件存在于wal存档备份目录中。
如何配置Standby从备份目录中读取此文件?或者以任何方式手动将此文件复制到备用服务器?
任何帮助将不胜感激。
答案 0 :(得分:0)
您必须将<!DOCTYPE html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
</head>
<body>
<div id="paypal-button-container"></div>
<script>
paypal.Button.render({
env: 'sandbox', // sandbox | production
// Show the buyer a 'Pay Now' button in the checkout flow
commit: true,
// payment() is called when the button is clicked
payment: function() {
var paymentPromise = new paypal.Promise(function(resolve, reject) {
reject(new Error("Err!"));
});
paymentPromise.catch(function(err) {
});
return paymentPromise;
},
// onAuthorize() is called when the buyer approves the payment
onAuthorize: function(data, actions) {
// Set up a url on your server to execute the payment
var EXECUTE_URL = '/demo/checkout/api/paypal/payment/execute/';
// Set up the data you need to pass to your server
var data = {
paymentID: data.paymentID,
payerID: data.payerID
};
// Make a call to your server to execute the payment
return paypal.request.post(EXECUTE_URL, data)
.then(function (res) {
window.alert('Payment Complete!');
});
}
}, '#paypal-button-container');
</script>
</body>
添加到restore_command
,以便从WAL存档中恢复文件。
然后重新启动备用数据库,它应该能够恢复。
当备用数据库无法通过流复制获得所需的WAL时,它会尝试recovery.conf
。当失败时,它会再次尝试流式复制,依此类推。