Thread: Re: [COMMITTERS] pgsql: Temporarily modify tsearch regression tests to suppress notice
Re: [COMMITTERS] pgsql: Temporarily modify tsearch regression tests to suppress notice
From
Bruce Momjian
Date:
I just talked to Teodor and we discussed this problem. My idea is to have a special marker in the synonym table, perhaps "*" to indicate the presence of _any_ stop word at that location. This will not produce any warnings because it is clearly intentional. The original warning for a literal stop word will remain but will happen only when the user users an actual unintentional use of a stop word. The synonym examples will need to be updated to use "*" as stop word markers. --------------------------------------------------------------------------- Tom Lane wrote: > Log Message: > ----------- > Temporarily modify tsearch regression tests to suppress notice that comes > out at erratic times, because it is creating a totally unacceptable level > of noise in our buildfarm results. This patch can be reverted when and if > the code is fixed to not issue notices during cache reload events. > > Modified Files: > -------------- > pgsql/src/backend/tsearch: > thesaurus_sample.ths (r1.1 -> r1.2) > (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tsearch/thesaurus_sample.ths?r1=1.1&r2=1.2) > pgsql/src/test/regress/expected: > tsdicts.out (r1.1 -> r1.2) > (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/tsdicts.out?r1=1.1&r2=1.2) > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
Re: [COMMITTERS] pgsql: Temporarily modify tsearch regression tests to suppress notice
From
Tom Lane
Date:
Bruce Momjian <bruce@momjian.us> writes: > I just talked to Teodor and we discussed this problem. My idea is to > have a special marker in the synonym table, perhaps "*" to indicate the > presence of _any_ stop word at that location. This will not produce any > warnings because it is clearly intentional. That's not fixing the problem, unless your proposal includes never issuing any warnings at all, for anything. regards, tom lane
Re: [COMMITTERS] pgsql: Temporarily modify tsearch regression tests to suppress notice
From
Bruce Momjian
Date:
Tom Lane wrote: > Bruce Momjian <bruce@momjian.us> writes: > > I just talked to Teodor and we discussed this problem. My idea is to > > have a special marker in the synonym table, perhaps "*" to indicate the > > presence of _any_ stop word at that location. This will not produce any > > warnings because it is clearly intentional. > > That's not fixing the problem, unless your proposal includes never > issuing any warnings at all, for anything. No warning for "*" because it is intentional, but warning for actual stop words. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
Re: [COMMITTERS] pgsql: Temporarily modify tsearch regression tests to suppress notice
From
Tom Lane
Date:
Bruce Momjian <bruce@momjian.us> writes: > Tom Lane wrote: >> That's not fixing the problem, unless your proposal includes never >> issuing any warnings at all, for anything. > No warning for "*" because it is intentional, but warning for actual > stop words. No, you're focusing on one symptom not the problem. The problem is that we've got user-visible behavior going on during what's effectively a chance event, ie, a cache reload. One possible real solution would be to tweak the dictionary APIs so that the dictionaries can find out whether this is the first load during a session, or a reload, and emit notices only in the first case. regards, tom lane
Re: [COMMITTERS] pgsql: Temporarily modify tsearch regression tests to suppress notice
From
Bruce Momjian
Date:
Tom Lane wrote: > Bruce Momjian <bruce@momjian.us> writes: > > Tom Lane wrote: > >> That's not fixing the problem, unless your proposal includes never > >> issuing any warnings at all, for anything. > > > No warning for "*" because it is intentional, but warning for actual > > stop words. > > No, you're focusing on one symptom not the problem. The problem is > that we've got user-visible behavior going on during what's effectively > a chance event, ie, a cache reload. > > One possible real solution would be to tweak the dictionary APIs so > that the dictionaries can find out whether this is the first load during > a session, or a reload, and emit notices only in the first case. Yea, that would work too. Or just throw an error for a stop word in the file and then you never get a reload (use "*" instead). -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +
Re: [COMMITTERS] pgsql: Temporarily modify tsearch regression tests to suppress notice
From
Tom Lane
Date:
Bruce Momjian <bruce@momjian.us> writes: > Tom Lane wrote: >> One possible real solution would be to tweak the dictionary APIs so >> that the dictionaries can find out whether this is the first load during >> a session, or a reload, and emit notices only in the first case. > Yea, that would work too. Or just throw an error for a stop word in the > file and then you never get a reload (use "*" instead). Hm, that's a thought --- it'd be a way to solve the problem without an API change for dictionaries, which is something to avoid at this late stage of the 8.3 cycle. Come to think of it, does the ts_cache stuff work properly when an error is thrown in dictionary load (ie, is the cache entry left in a sane state)? regards, tom lane