neondatabase / postgres

PostgreSQL in Neon
https://neon.tech/docs/reference/compatibility
27 stars 12 forks source link

Undo changes in Postgres core for building GIST/GIN indexes #435

Open knizhnik opened 5 months ago

knizhnik commented 5 months ago

Some Postgres indexes (GIN,GIST,SPGIST...) are using two-phase build: at first phase relation pages are constructed and at second phase - all relation is wal-logged. It doesn't work with Neon because if dirty page was thrown away from shared buffer before been wal-logged, then its content will be lost.

We have added support of unlogged builds to SMGR API. But it requires changes in Postgre core. What is even worser some extensions (i.e. pgvector) are also using the same policy and have to be patched.

This PR tries to avoid changes in Postgres core and did it at Neon extension level.