Re: [HACKERS] Reporting hba lines

2013-03-10 Thread Magnus Hagander
On Sun, Jan 20, 2013 at 5:56 PM, Dean Rasheed wrote: > On 5 January 2013 16:58, Magnus Hagander wrote: >> Attached is an updated version of the patch, per the comments from Tom >> and rebased on top of the current master. Since it's been a long time >> ago, and some code churn in the area, anothe

Re: [HACKERS] Reporting hba lines

2013-01-20 Thread Dean Rasheed
On 5 January 2013 16:58, Magnus Hagander wrote: > Attached is an updated version of the patch, per the comments from Tom > and rebased on top of the current master. Since it's been a long time > ago, and some code churn in the area, another round of review is > probably a good thing... > I took a

Re: [HACKERS] Reporting hba lines

2013-01-05 Thread Magnus Hagander
On Fri, Jun 29, 2012 at 4:39 PM, Tom Lane wrote: > Magnus Hagander writes: >> Turned out to be a bit more work than I thought, since the current >> parser reads pg_hba byte by byte, and not line by line. So I had to >> change that. See attached, seems reasonable? > > A couple of comments: > > * I

Re: [HACKERS] Reporting hba lines

2012-06-29 Thread Tom Lane
Magnus Hagander writes: > Turned out to be a bit more work than I thought, since the current > parser reads pg_hba byte by byte, and not line by line. So I had to > change that. See attached, seems reasonable? A couple of comments: * In some places you have "if ((c = *(*lineptr)++) != '\0')" and

Re: [HACKERS] Reporting hba lines

2012-06-29 Thread Magnus Hagander
On Wed, Jun 27, 2012 at 4:27 PM, Tom Lane wrote: > Magnus Hagander writes: >> On Wed, Jun 27, 2012 at 4:14 PM, Tom Lane wrote: >>> cases where people are modifying the wrong hba file.  Can we show >>> the source text of the hba line? > >> We don't currently keep the full source text around - but

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Tom Lane
Magnus Hagander writes: > On Wed, Jun 27, 2012 at 4:14 PM, Tom Lane wrote: >> cases where people are modifying the wrong hba file.  Can we show >> the source text of the hba line? > We don't currently keep the full source text around - but we certainly > could do that if we wanted to. If we're

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Magnus Hagander
On Wed, Jun 27, 2012 at 4:14 PM, Tom Lane wrote: > Magnus Hagander writes: >> On Wed, Jun 27, 2012 at 3:55 PM, Tom Lane wrote: >>> BTW, are you sure that auth_failed is only called in cases where >>> an hba line has already been identified?  Even if true today, >>> it seems fairly risky to assum

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Tom Lane
Magnus Hagander writes: > On Wed, Jun 27, 2012 at 3:55 PM, Tom Lane wrote: >> BTW, are you sure that auth_failed is only called in cases where >> an hba line has already been identified? Even if true today, >> it seems fairly risky to assume that. > It is true today, but yes, it might be safe t

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Magnus Hagander
On Wed, Jun 27, 2012 at 3:55 PM, Tom Lane wrote: > Magnus Hagander writes: >> When debugging strange and complex pg_hba lines, it can often be quite >> useful to know which line is matching a particular connection that >> failed for some reason. Because more often than not, it's actually not >> u

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Tom Lane
Magnus Hagander writes: > When debugging strange and complex pg_hba lines, it can often be quite > useful to know which line is matching a particular connection that > failed for some reason. Because more often than not, it's actually not > using the line in pg_hba.conf that's expected. > The eas

Re: [HACKERS] Reporting hba lines

2012-06-27 Thread Cédric Villemain
Le mercredi 27 juin 2012 14:54:15, Magnus Hagander a écrit : > When debugging strange and complex pg_hba lines, it can often be quite > useful to know which line is matching a particular connection that > failed for some reason. Because more often than not, it's actually not > using the line in pg_