From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
Cc: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Missing update of all_hasnulls in BRIN opclasses |
Date: | 2022-10-22 08:00:36 |
Message-ID: | 20221022080036.34git3yeyudlhalk@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2022-Oct-22, Tomas Vondra wrote:
> I wonder how to do this in a back-patchable way - we can't add
> parameters to the opclass procedure, and the other solution seems to be
> storing it right in the BrinMemTuple, somehow. But that's likely an ABI
> break :-(
Hmm, I don't see the ABI incompatibility. BrinMemTuple is an in-memory
structure, so you can add new members at the end of the struct and it
will pose no problems to existing code.
> The only solution I can think of is actually passing it using all_nulls
> and has_nulls - we could set both flags to true (which we never do now)
> and teach the opclass that it signifies "empty" (and thus not to update
> has_nulls after resetting all_nulls).
>
> Something like the attached (I haven't added any more tests, not sure
> what would those look like - I can't think of a query testing this,
> although maybe we could check how the flags change using pageinspect).
I'll try to have a look at these patches tomorrow or on Monday.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"I suspect most samba developers are already technically insane...
Of course, since many of them are Australians, you can't tell." (L. Torvalds)
From | Date | Subject | |
---|---|---|---|
Next Message | Bharath Rupireddy | 2022-10-22 08:05:09 | Re: Crash after a call to pg_backup_start() |
Previous Message | Alvaro Herrera | 2022-10-22 07:56:06 | Re: Crash after a call to pg_backup_start() |