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

restore fails with fe_sendauth: no password supplied at SL/User.pm line 585. #56

Open
andistern opened this issue May 5, 2022 · 3 comments
Assignees

Comments

@andistern
Copy link

when restoring from a ( very old ) version, I get this:
Restoring dataset version 2.6.12
DBD::Pg::db do warning: at SL/AM.pm line 3338.
done
Upgrading to Version 3.2.4 ...
DBI connect('dbname=action;host=localhost;port=5432','sql-ledger',...) failed: fe_sendauth: no password supplied at SL/User.pm line 585.
Error!

fe_sendauth: no password supplied

and makes the database unusable ( naturally )

@Tekki Tekki self-assigned this May 6, 2022
@andistern
Copy link
Author

andistern commented May 6, 2022

just found some sort of "obvious" workaround ( if anybody drops over that issue ):
restore using the commandline :

psql -h host database
\o log.log
\i backup_from_sql-ledger
\q

apply all applicable patches in the correct order from sql directory ( in my case some customer records got lost )

psql -h host database
\o ../../logs/Pg-upgrade-2.6.12-2.7.0.log
select count() from customer;
select * from defaults;
\i sql/Pg-upgrade-2.6.12-2.7.0.sql
-- ... a lot of lines (~150 or so ) omitted for readability
\o ../../logs/Tekki-upgrade-011-015.log
select count(
) from customer;
select * from defaults;
\i sql/Tekki-upgrade-011-015.sql
select count(*) from customer;
select * from defaults;
\q

... and two lines to be sure to get permissions right:

echo '\d' | psql -h host database | awk '$NF~/andistern/{print "ALTER " $5 " " $1 "." $3 " OWNER TO "sql-ledger";"}' > set_ownership_to_sql_ledger.sql
cat set_ownership_to_sql_ledger.sql | psql -h host database > set_ownership_to_sql_ledger.log

@Tekki
Copy link
Owner

Tekki commented May 9, 2022

To me it is still not clear what the issue was.
This may be not related, but did you read in doc/faq.html about backups from version 2.6.13 an lower (title 'PostgreSQL 8.x')?

@andistern
Copy link
Author

andistern commented May 9, 2022

thanks for the hint, we started with postgresql-8.3 so we already see
DROP TABLE makemodel;
DROP TABLE gl;
DROP TABLE chart;
-- and so on , and
CREATE SEQUENCE id;
SELECT SETVAL('id', 25460, FALSE);
-- and so on
-- in our SQL-Ledger Backup

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