Partitioning and replica #174
Unanswered
GiovanniGoccia
asked this question in
Help
Replies: 1 comment
-
This should be possible as long as you have your object & meta pairs on the same server ( Can you share here the code you're using to add your databases? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hello, i am configuring wordpress to move the postmeta table to a second db in write and read using your Partitioning guide. The procedure works but I was wondering if it was possible to have a write also in the primary db so that the postmeta tables between the 2 db are always the same.
With partitioning this does not happen and the postmeta table is only updated in the second db via the callback
global $wpdb;
$wpdb->add_callback( 'db_callback' );
function db_callback( $query, $wpdb ) {
if ($wpdb->base_prefix . 'postmeta' == $wpdb->table ) {
return 'wpposts';
}
}
what can I do to have the 2 tables always identical but only read from the second db?
Beta Was this translation helpful? Give feedback.
All reactions