BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

PostgreSQL Exam PGCES-02 Topic 2 Question 66 Discussion

Actual exam question for PostgreSQL's PGCES-02 exam
Question #: 66
Topic #: 2
[All PGCES-02 Questions]

A pg_hba.conf file is set up as follows. local all all md5 host all all 127.0.0.1/32 md5 host all all 172.16.1.0/24 md5 When user foo connects to database bar from host IP address 172.16.1.2, I would like password verification to not be performed. Select one appropriate line for the new pg_hba.conf file.

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Mindy
4 months ago
I think adding it to the last row is the best option, it won't interfere with other settings.
upvoted 0 times
...
Evette
4 months ago
I'm not sure, maybe we should add it to the first row instead.
upvoted 0 times
...
Rasheeda
4 months ago
I agree with Alfreda, it makes sense to add it to the last row.
upvoted 0 times
...
Alfreda
4 months ago
I think we should add 'host foo bar 172.16.1.2/32 trust' to the last row.
upvoted 0 times
...
Ollie
4 months ago
I bet the person who wrote this question has a wicked sense of humor. Tricking us with these obscure Postgres configuration options. Nicely done!
upvoted 0 times
...
Junita
4 months ago
Ha! Clearly the answer is E. The settings are fine as is. Why mess with a perfectly good configuration, am I right?
upvoted 0 times
Edgar
3 months ago
No need to change anything, the settings are fine as is.
upvoted 0 times
...
Dorsey
4 months ago
I think we should add 'host foo bar 172.16.1.2/32 trust' to the last row.
upvoted 0 times
...
...
Lindsay
4 months ago
Hmm, I'm not so sure about that. Wouldn't option D be more appropriate, since the database name comes before the user name in the rule?
upvoted 0 times
...
Kristofer
4 months ago
I think option C is the correct answer. It makes the most sense to add the 'trust' rule for the specific user and database combination to the last row.
upvoted 0 times
Mary
3 months ago
Yes, it's important to place the rule in the correct order in the pg_hba.conf file.
upvoted 0 times
...
Catalina
4 months ago
That would make sure that password verification is not performed for user foo connecting from host IP address 172.16.1.2.
upvoted 0 times
...
Benedict
4 months ago
I agree, adding the 'trust' rule for the specific user and database combination to the last row makes sense.
upvoted 0 times
...
Detra
4 months ago
I think option C is the correct answer.
upvoted 0 times
...
...

Save Cancel