16

You are correct: your admin account is not sysadmin, but a less powerful account. This is necessary to ensure that AWS is able to limit you from doing EVERYTHING to this instance, and escaping security boundaries. Setting a database online As part of your admin account, you have access to set databases offline, but bringing a database back online requires ...


5

ANALYZE VERBOSE; You need to run an ANALYZE query on the whole database using the above command. The issue is that the query plans postgres has generated are optimised for the previous version of postgres, when you do an RDS update it does not implicity regenerate these plans, this needs to be done manually (I'm sure there's a reason why AWS doesn't do ...


5

I had pgdump file with creating functions in custom schema and I wanted to switch custom schema name to general public and replaced all occurences with old schema to empty (e.g. myschema.tablename to tablename) And started to receive error ERROR: no schema has been selected to create in For my case error happens when at the beginning of dump present line ...


4

So running these two statements resolved my issue (being unable to access anything in the public schema): master_prod=> ALTER SCHEMA public OWNER to freetiersuperuser; ALTER SCHEMA master_prod=> GRANT ALL ON SCHEMA public TO freetiersuperuser; GRANT However my rds_superuser role's attributes haven't changed, and I would definitely like to understand ...


4

If your database connection is terminated without properly closing it (from the server side: if the client just silently dies), and running query will continue until one of these two things happen: The query produces a result row, the server tries to send it to the client and gets a network error. The operating system starts sending keepalive packages, ...


3

Adding this in the hope it helps others trying to test Ola's script in AWS RDS. I have created a 'DBA' database on a test RDS instance and installed the following parts of Ola Hallengren's maintenance scripts to this new DB. CommandExecute Commandlog DatabaseintegrityCheck IndexOptimise I did test running the full maintenance script but you get the ...


3

The stored procedure DatabaseBackup is not supported on Amazon RDS. As you note, there is logic that checks for the RDS platform. If these checks return that your server is an RDS instance the following code block is encountered. IF @AmazonRDS = 1 BEGIN SET @ErrorMessage = 'The stored procedure DatabaseBackup is not supported on Amazon RDS.' ...


3

(Long-winded, but incomplete, answer) The graph moves up and down rather smoothly. This puzzled me. With your latest numbers, I can explain some of what is going on. Data is written to the binlog until it exceeds max_binlog_size (128M, in your case). At that point, a new binlog file is created. Slave(s) pull the data from the binlogs continually, and ...


3

Swapping is a bad symptom of over-use of RAM. An excessive number of simultaneous connections may lead to swapping. Very complex queries may lead to swapping (due to temp tables). Let's see such queries if you have any. Have you changed any things in my.cnf (or the equivalent in RDS)? If so let's see if you raised some values too much. As a quick fix (and ...


3

The RDS Documentation states: Autovacuum is enabled by default for all new Amazon RDS PostgreSQL DB instances, and the related autovacuum configuration parameters are appropriately set by default. Because our defaults are somewhat generic, you can benefit from tuning parameters to your specific workload. You can check the activation of autovacuum with ...


3

That error message means you don't have enough permissions to install things in the master database. That's okay: you can install sp_Blitz (and any other stored procs) in a user database instead, and they'll work fine there. If you run into that same error in a user database (one you created), then you'll need to check with your sysadmins about your ...


3

I would rather create a separate db and use it for installs like these. We create a db called 'dba' and then put all our required stuffs in that including the Ola Hellengren's maintenance solution. This helps is segregating things. We usually do not create anything on the system databases.


2

The lagging size of the replica lagging the most in terms of WAL data received. Applies to PostgreSQL. If you’re using logical replication you might consider setting up some monitoring around this metric as it could indicate that your logical replication slot on RDS has switched to inactive - meaning it is no longer consuming the transaction logs. If left ...


2

You don't show your settings for "autovacuum_work_mem" and "maintenance_work_mem". The default settings in 9.4 are very low (64MB, which only allows 11M tuples to be vacuumed per pass over the index), unless RDS (or you) changed them. You need to set these to the highest value you can given the amount of RAM you have. "index": "446 GB", "toast": "29 MB", "...


2

In addition to what was already stated, I took a look at the amount of freeable RAM on the instance. My RAM useage was also very good, with plenty of usable RAM. The waits shown in the images are log file related -- the only thing that really should affect those is your disk IO. So begun the hunt: my CloudWatch metrics were showing a high number of writes (...


2

Analysis of VARIABLES and GLOBAL STATUS: (Alas, nothing here jumps out as an explanation of the Question in hand) I dislike doing FORCE INDEX, etc, but STRAIGHT_JOIN may be the simplest and safest way to force the ordering of the two tables. Observations: Version: 5.7.25-log 15.25 GB of RAM Uptime = 14:05:48; some GLOBAL STATUS values may not be ...


2

The error message is harmless, it only means that you imported the dump as a non-superuser and the extensions already existed. There are potential problems with using a non-superuser (ownership usually cannot be restored), but since you didn't get any such error messages, you are fine. The only important consideration is that you need to use pg_dump from ...


2

There is a limit of 10 backup files. When attempting to restore from more than 10 backup files, the following error occurs: The Restore task is unable to restore from more than 10 backup file(s). Please reduce the number of files matched and try again.


2

PostgreSQL does not use threads, it uses coordinated single-thread processes. It will not use more than max_parallel_workers, system-wide, at one time. If it would exceed that, the queries will not error out, they simply run with fewer worker processes than they "wanted". If the number of connections you have trying to run queries at the same time is ...


2

You could use an array of integers e.g. version 1.2.3 would be array[1,2,3]. Such an array compares (and sorts) correctly. To format it as a string, you could write some simple functions. Parsing is simple as well: string_to_array('1.2.3', '.')::int[]


2

Single-threading is very likely to be the cause of getting "behind". A Master can execute multiple transactions at the same time. But a single-threaded Slave is limited to one transaction at a time. This is the old, simple, way of doing Replication. Newer replication techniques are more complex. Depending on what version of MySQL you are running, multi-...


2

This could be a serious problem when replicating between MySQL 8.0 and MariaDB 10.x. The default (for good technical reasons) COLLATION for the 8.0 is utf8mb4_0900_ai_ci. Note the "255" associated with it. MariaDB has not yet adopted the Unicode 9.0 collations. Furthermore, Oracle (MySQL 8.0) did a major rewrite of the collation code, thereby possibly ...


1

You cannot do this with RDS. Sorry


1

In the example CREATE TEXT SEARCH CONFIGURATION fr ( COPY = french ); where the ( COPY = french ) is located? Text search configurations are stored in pg_catalog.pg_ts_config. They can also be displayed with \dF[+] in psql. Can be the copy statement ( COPY = french ) use data from the STDIN with my own rules? No. The COPY clause in CREATE TEXT SEARCH ...


1

ALTER DEFAULT PRIVILEGES only affects tables created by the user who ran the ALTER DEFAULT PRIVILEGES statement. You'd have to do this: ALTER DEFAULT PRIVILEGES FOR ROLE read_write IN SCHEMA my_schema GRANT SELECT ON TABLES TO read_only;


1

The most important information in addition to the connection state of the hung queries would be whether they are in any particular wait event. You can get that information by running “SELECT state, wait_event_type, wait_event FROM pg_stat_activity” (you may need to collect this in a cron job to get the data over time) Note that RDS also shows this ...


1

No, I wouldn't treat this any differently than you would an on-prem instance with regards to max server memory. The Windows Server 2012 box is almost certainly a VM, but hopefully Amazon is a managing that well to avoid VM problems. I would definitely reserve 3 GB at minimum for the OS and other overhead.


1

This error is a result of you not having access on that view. What you need to run to fix the permissions is ALTER TABLE public.spatial_ref_sys OWNER TO rds_superuser; GRANT SELECT, INSERT ON TABLE public.spatial_ref_sys TO public; Found here on the AWS forums


1

On Apr 21, 2019 ypercube pointed out the absence of a PRIMARY KEY and no UNIQUE specification for your table_two. Consider the following, please. CREATE TABLE `table_two` ( `aincid` INT AUTO_INCREMENT PRIMARY KEY, `id` varchar(200) NOT NULL DEFAULT 'idUNKNOWN', `Name` varchar(200) DEFAULT NULL, `deviceType` varchar(50) DEFAULT NULL, `issuedBy` varchar(200) ...


1

Analyzing your tables, they both use unique identifiers for the field ID, so the distinct clause is not necessary (and it's expensive), so you are free to remove it. Change the order of your tables in your query, by swapping table_one and table_two as follows: SELECT Name,d.id,deviceType,issuedBy, description,avNum,CompanyName, BrandName,dwNumber,quant,...


Only top voted, non community-wiki answers of a minimum length are eligible