Sample Header Ad - 728x90

Database Administrators

Q&A for database professionals who wish to improve their database skills

Latest Questions

0 votes
0 answers
195 views
BUCARDO - PL/Perl function "validate_goat" at /usr/local/bin/bucardo
I'm new to Bucardo, I have been trying to replicate PostgreSQL-12 using Bucardo with no success due to the errors. ``` DBD::Pg::st execute failed: ERROR: DBI connect('dbname=test1','bucardo',...) failed: FATAL: Peer authentication failed for user "bucardo" at line 64. CONTEXT: PL/Perl function "vali...
I'm new to Bucardo, I have been trying to replicate PostgreSQL-12 using Bucardo with no success due to the errors.
DBD::Pg::st execute failed: ERROR:  DBI connect('dbname=test1','bucardo',...) failed:
FATAL:  Peer authentication failed for user "bucardo" at line 64.
CONTEXT:  PL/Perl function "validate_goat" at /usr/local/bin/bucardo line 7292.
https://github.com/bucardo/bucardo/issues/133 https://github.com/bucardo/bucardo/issues/140 I have added full access to the postgres and bucardo users from both ~/.pgpass and pg_hba.conf I have added every possible combination I know to the ~/.pgpass (in both postgres & bucardo home directories as mentioned).. I was able to successfully add the database to bucardo. but not the Tables. I was able to do this by logging into the bucardo shell. (When logged into the postgres shell these commands failed)
bucardo add database pgmaster1 dbname=test1
bucardo add database pgmaster2 dbname=test1 host=pgmaster2
bucardo show all
The above commands work, but the following command does not work.
bucardo add all tables
I'm loosing my hair trying to find the correct combination to execute these commands. I followed the https://bucardo.org/Bucardo/installation/ and https://bucardo.org/Bucardo/pgbench_example And setup the bucardo, I also tried the https://bucardo-general.bucardo.narkive.com/roH4tJN4/authentication-problem-when-running-bucardo I overcame the primary challenge with username& passwords (and finally found that pg_hba.conf trust every thing worked)
host    all     bucardo     ::1/128             trust
host    all     all         ::1/32              trust
host    all     postgres    192.168.1.192/32    trust
host    all     postgres    192.168.1.193/32    trust
host    all     bucardo     192.168.1.192/32    trust
host    all     bucardo     192.168.1.193/32    trust
The ~/.pgpass file (in both postgress and bucardo home)
192.168.1.192:5432:postgres:postgres:postgres
192.168.1.192:5432:bucardo:bucardo:bucardo
192.168.1.193:5432:postgres:postgres:postgres
192.168.1.193:5432:bucardo:bucardo:bucardo
Shawn (101 rep)
Jun 22, 2021, 10:37 AM
-1 votes
1 answers
675 views
Bucardo - without Primary Key and Unique Key
I read this from Postgresql Wiki page. Cannot incrementally replicate tables without a unique key (it can "fullcopy" them) 1. Now we have 5.5.0, so still do we need PK or unique key for this? 2. What are the impacts of bucardo without Pk/Unique keys?
I read this from Postgresql Wiki page. Cannot incrementally replicate tables without a unique key (it can "fullcopy" them) 1. Now we have 5.5.0, so still do we need PK or unique key for this? 2. What are the impacts of bucardo without Pk/Unique keys?
TheDataGuy (1986 rep)
Dec 8, 2018, 11:34 AM • Last activity: Oct 20, 2019, 09:01 PM
8 votes
1 answers
4454 views
Partial (filtered) replication in PostgreSQL
My setup looks something like this: I have a primary server (Postgres 9.6) that continually scrapes a bunch of data from the web. I'd like to be able to stream a subset of tables or databases from that primary into a secondary instance so I can read the data from a web app. The web app needs to do s...
My setup looks something like this: I have a primary server (Postgres 9.6) that continually scrapes a bunch of data from the web. I'd like to be able to stream a subset of tables or databases from that primary into a secondary instance so I can read the data from a web app. The web app needs to do standard web app things with its database (read/write tables for user accounts, perform authentication, etc.) and also be able to run queries on the replicated data. [Streaming replication with a hot standby](https://www.postgresql.org/docs/9.6/static/warm-standby.html#STREAMING-REPLICATION) looked like it would be up my alley, but [a Reddit response from a few years ago](https://www.reddit.com/r/PostgreSQL/comments/3a5976/partial_streaming_replication/#thing_t1_cs9gdht) seems to suggest that you can't filter for specific tables or write to the replicated cluster at all. From poking around on the Internet, my impression is that most people solve this problem with third-party tools like Bucardo and Slony – I'm open to that, but I'm looking for the simplest possible solution and adding a dedicated replication system to my stack seems unnecessarily intense. [This SO question from last year](https://stackoverflow.com/questions/32407764/its-possible-to-use-logical-decoding-to-replicate-a-single-table) had a promising lead using logical decoding, which makes me wonder if there is any new work in that direction. I'm also wondering if it would work to just run two instances of Postgres and bind them to different ports. Are there any solutions here that don't require installing third-party tools? If a third-party tool is absolutely necessary, which one would have the lowest overhead for my purposes, from your experience? Thanks in advance for the help, y'all. First question here and I'm thrilled to have access to your expertise.
jeancochrane (221 rep)
Mar 13, 2017, 11:37 PM • Last activity: Mar 16, 2017, 04:22 PM
2 votes
1 answers
1131 views
How to keep the sync active with Bucardo
I have a master-master sync setup between 3 nodes or 3 different host machines using bucardo. All works good. However when one of the database or a host is not reachable or goes down for some reason, the other 2 nodes go out of sync too. It stalls the sync and goes into inactive state. I would like...
I have a master-master sync setup between 3 nodes or 3 different host machines using bucardo. All works good. However when one of the database or a host is not reachable or goes down for some reason, the other 2 nodes go out of sync too. It stalls the sync and goes into inactive state. I would like to keep the sync active between the other 2 nodes at the least. And the third one should catchup once its back online. Is this possible? Let me know how should I go about setting up bucardo sync for such a scenario.
Sijo (21 rep)
Oct 29, 2014, 08:27 AM • Last activity: Sep 2, 2015, 06:14 AM
Showing page 1 of 4 total questions