Re: pgsql: Extended statistics on expressions

2021-04-06 Thread Tomas Vondra
On 4/1/21 4:24 AM, David Rowley wrote: > On Thu, 1 Apr 2021 at 14:49, Tomas Vondra > wrote: >> I think that's probably sufficient for now. More testing may be useful >> once I refactor the code a bit to make it more readable. > > Just to let you know, I left it running a bit longer. About 70 min

Re: pgsql: Extended statistics on expressions

2021-03-31 Thread David Rowley
On Thu, 1 Apr 2021 at 14:49, Tomas Vondra wrote: > I think that's probably sufficient for now. More testing may be useful > once I refactor the code a bit to make it more readable. Just to let you know, I left it running a bit longer. About 70 mins now. No crashes yet. David

Re: pgsql: Extended statistics on expressions

2021-03-31 Thread Tomas Vondra
On 4/1/21 3:43 AM, David Rowley wrote: > On Thu, 1 Apr 2021 at 11:07, Tomas Vondra > wrote: >> The attached patch fixes this for me. David, can you check if this >> resolves the issue for you? > > Thanks for taking a look at this. > > I applied your patch and kicked off sqlancer with 64 threads

Re: pgsql: Extended statistics on expressions

2021-03-31 Thread David Rowley
On Thu, 1 Apr 2021 at 11:07, Tomas Vondra wrote: > The attached patch fixes this for me. David, can you check if this > resolves the issue for you? Thanks for taking a look at this. I applied your patch and kicked off sqlancer with 64 threads. It's been going about 30 mins without any crashes so

Re: pgsql: Extended statistics on expressions

2021-03-31 Thread Tomas Vondra
On 3/31/21 7:54 PM, Tomas Vondra wrote: > On 3/31/21 7:08 PM, Alvaro Herrera wrote: >> On 2021-Mar-31, Tomas Vondra wrote: >> >>> Thanks for the report, I'll take a look. You're right this seems like an >>> out-of-bounds access, but mcv_match_expression is only expected to be >>> run on expressio

Re: pgsql: Extended statistics on expressions

2021-03-31 Thread Tomas Vondra
On 3/31/21 7:08 PM, Alvaro Herrera wrote: > On 2021-Mar-31, Tomas Vondra wrote: > >> Thanks for the report, I'll take a look. You're right this seems like an >> out-of-bounds access, but mcv_match_expression is only expected to be >> run on expressions we know are in the statistics (because we pic

Re: pgsql: Extended statistics on expressions

2021-03-31 Thread Alvaro Herrera
On 2021-Mar-31, Tomas Vondra wrote: > Thanks for the report, I'll take a look. You're right this seems like an > out-of-bounds access, but mcv_match_expression is only expected to be > run on expressions we know are in the statistics (because we pick the > statistics like that). Clearly, that does

Re: pgsql: Extended statistics on expressions

2021-03-31 Thread Tomas Vondra
On 3/31/21 10:05 AM, David Rowley wrote: > Hi Tomas, > > I'm debugging a crash after running sqllancer on current master. The > first bad commit seems to be this one. > > The crash stack trace is: > > Program received signal SIGSEGV, Segmentation fault. > pg_detoast_datum_packed (datum=0x5) a

Re: pgsql: Extended statistics on expressions

2021-03-31 Thread David Rowley
Hi Tomas, I'm debugging a crash after running sqllancer on current master. The first bad commit seems to be this one. The crash stack trace is: Program received signal SIGSEGV, Segmentation fault. pg_detoast_datum_packed (datum=0x5) at fmgr.c:1759 1759 if (VARATT_IS_COMPRESSED(datum) || VARATT_I