Re: Memory-comparable Serialization of Data Types

2020-02-12 Thread Shichao Jin
Thank you for both your feedback. Yes, as indicated by Peter, we indeed use that technique in comparison in index, and now we will try passing comparator to the storage engine according to Alvaro's suggestion. Best, Shichao On Tue, 11 Feb 2020 at 17:16, Peter Geoghegan wrote: > On Tue, Feb 1

Re: Memory-comparable Serialization of Data Types

2020-02-11 Thread Peter Geoghegan
On Tue, Feb 11, 2020 at 1:40 PM Alvaro Herrera wrote: > I think adding that would be too much of a burden, both for the project > itself as for third-party type definitions; I think we'd rather rely on > calling the BTORDER_PROC btree support function for the type. An operator class would still n

Re: Memory-comparable Serialization of Data Types

2020-02-11 Thread Alvaro Herrera
On 2020-Feb-11, Peter Geoghegan wrote: > On Tue, Feb 11, 2020 at 12:19 PM Shichao Jin wrote: > > Yes, this is exactly what I mean. > > PostgreSQL doesn't have this capability. It might make sense to have > it for some specific data structures, I think adding that would be too much of a burden,

Re: Memory-comparable Serialization of Data Types

2020-02-11 Thread Peter Geoghegan
On Tue, Feb 11, 2020 at 12:19 PM Shichao Jin wrote: > Yes, this is exactly what I mean. PostgreSQL doesn't have this capability. It might make sense to have it for some specific data structures, such as tuples on internal B-Tree pages -- these merely guide index scans, so there some information l

Re: Memory-comparable Serialization of Data Types

2020-02-11 Thread Shichao Jin
Yes, this is exactly what I mean. On Tue, 11 Feb 2020 at 15:01, Peter Geoghegan wrote: > On Tue, Feb 11, 2020 at 11:53 AM Shichao Jin wrote: > > We are currently integrating LSM-tree based storage engine RocksDB into > Postgres. I am wondering is there any function that serialize data types in

Re: Memory-comparable Serialization of Data Types

2020-02-11 Thread Peter Geoghegan
On Tue, Feb 11, 2020 at 11:53 AM Shichao Jin wrote: > We are currently integrating LSM-tree based storage engine RocksDB into > Postgres. I am wondering is there any function that serialize data types in > memory-comparable format, similar to MySQL and MariaDB. With that kind of > function, we

Memory-comparable Serialization of Data Types

2020-02-11 Thread Shichao Jin
Hi Postgres Developers, We are currently integrating LSM-tree based storage engine RocksDB into Postgres. I am wondering is there any function that serialize data types in memory-comparable format, similar to MySQL and MariaDB. With that kind of function, we can directly store the serialized forma