Skip to content

Do not read neither the system-wide psqlrc file nor the user's ~/.psqlrc file - #28

Open
diffway wants to merge 1 commit into
maxhq:masterfrom
diffway:feature_psql_batch_options
Open

Do not read neither the system-wide psqlrc file nor the user's ~/.psqlrc file#28
diffway wants to merge 1 commit into
maxhq:masterfrom
diffway:feature_psql_batch_options

Conversation

@diffway

@diffway diffway commented Jul 2, 2021

Copy link
Copy Markdown

During unknown tables check there is error:

Reading database options from /etc/zabbix/zabbix_server.conf...
Configuration:
- type: psql
- host: 127.0.0.1 (127.0.0.1)
- port: 5432
- database: zabbix
- user: zabbix
- output: /tmp/tmp.tzM4s7yilr
Fetching list of existing tables...

ERROR
Unknown tables found in database:
- Time:
- 7.813
- ms
To include them (full data backup) specify -f, to ignore them use -i

It happens because I use \timing in ~/.psqlrc to see how long each query takes.

Adding --no-psqlrc solves the issue.

PS: System info: postgres-server-11 on debian-8 (jessie)
PPS: Sorry my Markdown skill is poor.

@ironbishop

Copy link
Copy Markdown

maybe you should add an option to enable/disable this behavior, rather than always disabling?

@diffway

diffway commented Jul 22, 2021

Copy link
Copy Markdown
Author

@ironbishop, thanks for comment.
IMO backup software should just work, in case of bath mode, it should not rely on local user preferences.
I would prefer to leave this PR as-is, if it's possible.

btw, there is duplicate: #25

@ironbishop

Copy link
Copy Markdown

There is, and it's missing the cli option the same way. Can you add it?

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

Successfully merging this pull request may close these issues.

2 participants