Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"bucardo add table" - execution failed #226

Open
ganeshcse2991 opened this issue Apr 13, 2021 · 3 comments
Open

"bucardo add table" - execution failed #226

ganeshcse2991 opened this issue Apr 13, 2021 · 3 comments

Comments

@ganeshcse2991
Copy link

ganeshcse2991 commented Apr 13, 2021

I am trying to run bucardo add table users after adding the databases. I am getting the following error while adding the tables:

DBD::Pg::st execute failed: ERROR: install_driver(Pg) failed: Can't locate DBD/Pg.pm in @inc (you may need to install the DBD::Pg module) (@inc contains: /Library/Perl/5.28/darwin-thread-multi-2level /Library/Perl/5.28 /Network/Library/Perl/5.28/darwin-thread-multi-2level /Network/Library/Perl/5.28 /Library/Perl/Updates/5.28.2/darwin-thread-multi-2level /Library/Perl/Updates/5.28.2 /System/Library/Perl/5.28/darwin-thread-multi-2level /System/Library/Perl/5.28 /System/Library/Perl/Extras/5.28/darwin-thread-multi-2level /System/Library/Perl/Extras/5.28) at line 3.
Perhaps the DBD::Pg perl module hasn't been fully installed,
or perhaps the capitalisation of 'Pg' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Mem, Proxy, SQLite, Sponge.
at line 64.
CONTEXT: PL/Perl function "validate_goat" at /usr/local/bin/bucardo line 5269

However running bucardo add database dbname=source worked without any errors. Not sure what I am missing. I tried passing password with dbpass while adding tables and it did not work too.

OS: MAC OS Big Sur 11.1

@jonjensen
Copy link
Member

@ganeshcse2991 It looks like your system Perl that is used by PL/Perl in Postgres doesn't have DBD::Pg installed.

Are you using a custom perl installation for bucardo itself?

(This would be better discussed on the mailing list, since this isn't an issue with Bucardo itself.)

@ganeshcse2991
Copy link
Author

No @jonjensen I have installed DBD::Pg manually also and tried adding tables again. No luck with that too.

Also, I am not using any custom perl.

@jonjensen
Copy link
Member

jonjensen commented Apr 15, 2021

@ganeshcse2991 Where is your DBD::Pg installed? It seems not to be in the Perl @INC path where PL/Perl functions can see it.

See the Postgres docs on PL/Perl and for example you can have psql connect to your bucardo database as the postgres role and print out the @INC path it is using:

postgres@bucardo:5432=# DO 'elog(WARNING, join(", ", @INC))' LANGUAGE plperlu;
WARNING:  /usr/local/lib64/perl5/5.32, /usr/local/share/perl5/5.32, /usr/lib64/perl5/vendor_perl, /usr/share/perl5/vendor_perl, /usr/lib64/perl5, /usr/share/perl5

Your installed DBD::Pg should be in one of those paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants