GCP cloud sql postgres connection count missing - postgresql

I have a problem after migration postgres instance from 9 to 12, we were following this method https://cloud.google.com/sql/docs/postgres/upgrade-db.
Before migration, I had a graph whit active connections on instance page and after the migration (on the new instance - postgres 12) - I don`t have values on this graph.
I am receiving a message like "No data is available for the selected time frame."
Also if I am run a query like "SELECT * FROM pg_stat_activity;"
I see the number of connections.

At this moment the graph section for connections count in Postgres12 is not currently supported. The Cloud SQL engineering team is working on implementing this feature as its already implemented for other Postgres versions. This is not just happening to you, it is a general behaviour.

The best way to report an issue is to use a Google Issue Tracker1, where you can share your project information.
I found that same error reported by another client but I cannot relate it to your scenario.

Related

Why does QGIS creates multiple connections for PostgreSQL Server?

We have a PostgreSQL database with PostGIS running and today we ran into the issue that too less connections were available. Mostly we are using QGIS to access the database. We realized that issue because multiple users got the following error:
FATAL: remaining connection slots are reserved for non-replication superuser connections
When checking the number of connections in pgAdmin I realized a thing I saw before, but as I never ran into problems didn't care too much about.
QGIS creates multiple connections to PostgreSQL for the same user to the same database.
Now I am wondering why this is the case and how I can maybe change that behaviour.
Could this happen for example if a person got access rights to a database through different user groups?
One approach might be the issue that some users run into that if you add layers to a QGIS project that was created before might ask you multiple times for your login credentials if those changed. This seem to me that probably different credentials are saved with the project and therefor multiple connections might be used. Can anyone confirm or dispruve this? - Suggestions for a test scenario are also welcome to check this.
Any ideas, hints or soutions are welcome.
By the way: Yes we increase the number of max_connections, but I want to understand why this happens and get closer to the core of the situation.

Datstage Connector Metadata import hangs when choosing any of the available connections

I have a sample job that successfully extracts data from an Oracle database via the ODBC connector and I will mention that I manually added a column description for one of the columns in the Oracle table (I am also successful in extracting from an SQL Server db). I need to add table definitions, and I am attempting to use Import -> Table Definitions -> Start Connector Import Wizard. I receive a list of connectors to choose from including "ODBC Connector". When I choose it and press Next, it just hangs and eventually times out, displaying not able to connect. This behavior occurs for other connectors as well, i.e. Oracle.
This has worked in the past for us, and it has just started recently with this problem. We have tried using a user with more permissions, to no avail. Please note that the odbc connector is working fine to extract data, just not to import metadata. One of the team members performed a DataStage server restart but the problem persists.
Please advise.
Thanks,
David
The obvious question you must ask, when something is not longer working that used to work, is "what changed"? (And "nothing" is not the correct answer.) Have any patches been made, either to InfoSphere Information Server or to the operating system, for example? Your description has helped to eliminate certain possibilities, such as the Connector Access Service, it remains to do what Sherlock Holmes advised; eliminate the impossible then anything that remains is possible. Please do examine the logs, especially /opt/IBM/WebSphere/AppServer/profiles/InfoSphere/logs/server1/SystemOut.log, to determine whether any problem has been logged at the same time as the wizard has been unable to return a list of Connectors. You might also try to create and use a Connection within the InfoSphere Metadata Asset Manager tool.

REST API issue in PowerBI to GoogleBigQuery

This has been an issue every now and then for the last year but now since last Friday it's dramatic.
None of our queries are refreshing like they were before.
Message:
Error interacting with REST API: Couldn't connect to server ERROR
[HY000] [Microsoft][DriverOAuthSupport] (8701) Error interacting with
REST API: Couldn't connect to server Table:
Notes:
PowerBI - Desktop refresh works
The table or view triggering the error differs, it's not always the same table or view.
It seems to be related to running parallel queries, loading from the same table simultaneously.
Dataflow jobs are reported to be working, since the load sequentially
Can Microsoft and Google talk to each other? On both sides they are pointing to each other.
It seems that this has affected several users in the last days.
I found this Public Issue Tracker where it's said that the BigQuery Eng team is working on this. I could also see that there are no workarounds available for now.
Feel free to ask for updates or add additional questions on it.

Connect to postgresql database using google apps script from google spreadsheet

I've seen this question asked a few times before, most notably this StackOverflow question: Automate Google Spreadsheet data load from external database
and here on Google issue tracker:
https://issuetracker.google.com/issues/36752790
but I'm looking for a more up-to-date answer.
I have a cloud-SQL instance of a PostgreSQL database running on GCP. I would like to automatically connect to it and populate a spreadsheet on a daily basis, which is possible for MySQL databases.
The docs on Google say to use a jdbc socket factory to connect to a PostgreSQL db using the format:
"jdbc:postgresql://google/<DBNAME>?"
"socketFactory=com.google.cloud.sql.postgres.SocketFactory"
"&socketFactoryArg=<InstanceName>"
I've also tried the format (slightly different) from the Google GitHub page (linked under the example in the docs):
"jdbc:postgresql://google/<DATABASE_NAME>?cloudSqlInstance=<INSTANCE_CONNECTION_NAME>&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=<POSTGRESQL_USER_NAME>&password=<POSTGRESQL_USER_PASSWORD>"
After creating a url I run:
var conn = Jdbc.getConnection(dbUrl)
But get this error:
Connection URL uses an unsupported JDBC protocol.
I'm wondering if this is possible yet or if it is user error?
I found JDBC in Google Sheets, especially for Postgres, to be buggy, so I built SeekWell which lets you automatically send data from Postgres to Sheets. You can also also sync changes from Sheets back to a database and schedule refreshes daily, hourly or every five minutes.
Disclaimer: I built this.

Connect AppMaker to Google SQL

I tried to connect AppMaker to an existing Google SQL database without success. In Google Cloud, I created a second generation instance (europe-west1) and allow every IP (for the test). Next, I created a user, connected Workbench with the database and created a schema. Without problems.
In AppMaker I use the following address to connect to the database:
[domainName:]myprojectID:regionName:myinstanceID/mydatabase
(with and without domain)
Feedback:
Unable to connect to Google Cloud SQL instance.
The Google Cloud SQL address may be incorrect or this App Maker editor may not have permission to access the database. You can find more information about using Google Cloud SQL in our documentation.
How can I connect to Google SQL with AppMaker?
Thanks.
The process I followed to connect to the database is the following:
Create a second generation instance by following the steps here (Please make sure to follow the steps only for "Create a Cloud SQL instance" and then create a database inside that instance)
Now, go to the IAM & ADMIN section of your project. Click on the blue "add" member option on the top. Type "appmaker-maestro#appspot.gserviceaccount.com" on the "Members" field and from the "Roles" dropdown select Project->Editor
Return to your second generation SQL instance and copy the value of the Instance connection name property of your instance. Example:
Follow the steps for second generation found here to connect to the database from AppMaker and when asked for the instance address, type the value you copied on the previous step and add /yourdatabase at the end of it. For example: my-foto-app:us-central1:myinstance/userphotodatabase
You should now be asked to enter the user and password. Do so and you are finished.
Please note that I haven't tested out this with a europe location but only on a us central location. I hope this helps and works!
Second generation instances are not yet supported by App Maker, switch to first generation and it will work.
FYI, 2nd gen Cloud SQL is supported bv App Maker and has been for awhile.
As of today, Postgre is not yet supported.