Open ralf-berger opened 3 weeks ago
@jeanqussa Do you have any idea why some of the PostgreSQL table indices might be missing in production?
Could it be that the init container imports the dump but terminates the PostgreSQL instance before it is done actually indexing the data?
That should not be the case. The indices are part of the dump. If the dump is the same and the image is the same, then the only thing different is the environment. Do containers in both environments have the same amount of storage/memory resources available?
Do containers in both environments have the same amount of storage/memory resources available?
Yes.
Is there a way to make sure index creation doesn't fail silently? Maybe utilizing the equivalent of
pg_restore --schema-only && pg_restore --data-only
,pg_restore --exit-on-error
, orpg_restore --single-transaction
(not sure about memory/storage requirements)?
There are indices missing on PostgreSQL tables in production (see https://github.com/ude-soco/CourseMapper-webserver/discussions/1219). I ran the following query in both environments to check for differences in user-created indices:
Preview environment (edge)
Production environment