How can we help you today? How can we help you today?

Aurora Postgres Error: 39P02: table-function protocol for materialize mode was not followed

Has anyone got this error on Aurora Postgres 16.1 on RDS?

39P02: table-function protocol for materialize mode was not followed

I have followed the instructions, and I don't get why I'm getting this error.
chris_ford2020
0

Comments

3 comments

  • Sujay
    Hi Chris,

    Thank you for reaching out.
    We have observed this issue at times when the extension version of log_fdw was lower than 1.3

    It would help to check if this is the case.
    If so, the version of log_fdw can be updated using the below command:
    ALTER EXTENSION log_fdw UPDATE;
    Please let us know if this helps.

    Regards,
    Sujay
    Sujay
    0
  • chris_ford2020
    I ran this and I got back:

    version "1.3" of extension "log_fdw" is already installed
    chris_ford2020
    0
  • jim brazendale

    just encountered the same issue when upgrading from postgresql v13 to v16, the error can be reproduced in sql by running the following query :


    SELECT * FROM list_postgres_log_files() ORDER BY 1;

    and is fixed by recreating the extension and foreign data wrapper as per set up instructions:


    drop EXTENSION  log_fdw cascade;

    select * from pg_available_extensions where name ='log_fdw';

    CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
    CREATE EXTENSION IF NOT EXISTS log_fdw;
    CREATE SERVER sqlmonitor_file_server FOREIGN DATA WRAPPER log_fdw;


    GRANT EXECUTE ON FUNCTION list_postgres_log_files() TO "*****";
    GRANT EXECUTE ON FUNCTION create_foreign_table_for_log_file(text, text, text) TO "****";
    GRANT USAGE ON FOREIGN SERVER sqlmonitor_file_server TO "****";
     

    select * from pg_available_extensions where name ='log_fdw';
     

     

    jim brazendale
    0

Add comment

Please sign in to leave a comment.