Code Monkey home page Code Monkey logo

amazon-rds-and-amazon-aurora-logging-blog's Introduction

Amazon RDS And Amazon Aurora Logging Blog

This repository contains the scripts mentioned in the AWS Database blog post titled "Working with RDS and Aurora PostgreSQL Logs".

License

This library is licensed under the Apache 2.0 License.

amazon-rds-and-amazon-aurora-logging-blog's People

Contributors

jamesiri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

amazon-rds-and-amazon-aurora-logging-blog's Issues

get_pg_log_files.sh works only partialy

There is an very old issue that amazon haven't fixed for years now. If you have strange symbol(binary) in the logs download breaks. It is an issue with boto3 rds client, and for me is happening all the time. Error looks like that:

An error occurred (InvalidParameterValue) when calling the DownloadDBLogFilePortion operation: This file contains binary data and should be downloaded instead of viewed.

I just tried your script get_pg_log_files.sh and I get the same.

ERROR: literal carriage return found in data

When executing
SELECT * FROM logs.postgres_logs;
got an error

ERROR:  literal carriage return found in data
HINT:  Use "\r" to represent carriage return.
CONTEXT:  COPY postgres_logs_20210322_0900, line 20

Postgres AWS RDS
select version();
PostgreSQL 11.10 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11), 64-bit

Error: public.list_postgres_log_file() not found.

Engine version: 11.13
Error:
ERROR: function public.list_postgres_log_files() does not exist
LINE 1: SELECT file_name FROM public.list_postgres_log_files() WHERE...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
QUERY: SELECT file_name FROM public.list_postgres_log_files() WHERE file_name LIKE '%.csv' ORDER BY 1 DESC
CONTEXT: PL/pgSQL function load_postgres_log_files(text,text,boolean) line 56 at FOR over EXECUTE statement

I know the documentation says you need v12 for PostGres, but is that for this Function to work as well? or just to enable pg_cron?
https://aws.amazon.com/blogs/database/automate-postgresql-log-exports-to-amazon-s3-using-extensions/
Really not sure what enables this function, the documentation doesn't suggest that we create this function too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.