pg_gather icon indicating copy to clipboard operation
pg_gather copied to clipboard

ERROR while running against Aurora : ERROR: wal_level must be set to 'logical'

Open jobinau opened this issue 3 years ago • 2 comments

Here is a sample error.

COPY pg_gather FROM stdin;
psql:/app/gather.sql:35: ERROR:  wal_level must be set to 'logical'
HINT:  WAL control functions cannot be executed when wal_level < logical.

jobinau avatar Jul 20 '21 06:07 jobinau

This is found to be a major limitation of Aurora which doesn't support PostgreSQL built-in functions like pg_current_wal_lsn(). Even though Aurora is claimed to be PostgreSQL compatible. Understanding the WAL generation is important. So this cannot be avoided.

jobinau avatar Jul 20 '21 06:07 jobinau

A Temporary workaround is to replace CASE WHEN pg_is_in_recovery() THEN pg_last_wal_receive_lsn() ELSE pg_current_wal_lsn() END with NULL in gather.sql

jobinau avatar Jul 20 '21 06:07 jobinau