Does Neon run autovacuum?

Hi, I am new to Neon, and want to try it as an alternative to PG for cloud deployment, I have some questions below to have better understanding of how Neon works:

1: Does Neon use exactly same PG file format for WAL and data files?
2: Does Neon run autovacuum same as PG?
3: Is Neon api / sql staement support 100% compatible with PG?

Any blog/doc introducing Neon internals is appreciated, thanks.

1 Like

1: Does Neon use exactly same PG file format for WAL and data files?

Not exactly - there are small differences caused by necessity to store CID (command identifier). We are going to support both WAL formats.

2: Does Neon run autovacuum same as PG?

Yes

3: Is Neon api / sql staement support 100% compatible with PG?

Yes, Neon separates compute and storage but SQL engine is the same.

1 Like

Thanks for the prompt response, I watched YouTube videos and understood that the keeper and page server take care of WAL only, my question is:

How the metadata is handled / saved (table creation DML / user role ) if only WAL is streamed to cloud storage for HA?

In Postgres metadata is stored as normal data. I.e. content of system catalog (tables pg_class, pg_attributes,…) are updated in the same way as other tables (well, to be absolutely precise there are some optimised access methods for system catalog, but it is just optimisation).

Certainly, in any system where are distinguish data and metadata, we have to somehow cut infinite recursion: to describe format of metadata with need mete-metadata and so on… In Postgres it is resolved by special bootstrap procedure.

But it has no direct relation to you question. To answer your question it is enough to notice that DDL manipulating with metadata is WAL-logged almost in the same way as DML. So for Neon there is no difference with you are updating data or metadata.

1 Like

Thanks, that explains a lot. One last question is how Neon handle configuration file change, postgresql.conf for example?

In the same way as vanilla Postgres. You can use ALTER SYSTEM + pg_reload_conf to change configuration parameters.

1 Like