On Sat, Feb 27, 2021 at 9:35 PM Justin Pryzby <pry...@telsasoft.com> wrote: > > > Subject: [PATCH v28 3/4] Add default_toast_compression GUC > > This part isn't working. My first patch worked somewhat better: due to doing > strcmp() with the default GUC, it avoided using the cached AM OID. (But it > would've failed with more than 2 AMs, since the cache wasn't invalidated, > since > I couldn't tell when it was needed). > > Your patch does this: > > |postgres=# SET default_toast_compression=lz4 ; > |postgres=# CREATE TABLE t(a text); > |postgres=# \d+ t > | a | text | | | | extended | pglz | > | > > assign_default_toast_compression() should set > default_toast_compression_oid=InvalidOid, rather than > default_toast_compression=NULL.
I will fix this. > In my original patch, that was commented, since I was confused, not realizing > that the GUC machinery itself assigns to the string value. We should assign > to > the cached Oid, instead. > Reading my own patch, I see that in AccessMethodCallback() should also say > InvalidOid. > | default_toast_compression_oid = false; > The false assignment was copied from namespace.c: baseSearchPathValid. I will fix this. So as of now, we can make this patch such that it is enough to work with the built-in method and later we can add another enhancement patch that can work with the custom compression methods. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com