Where are added data in database - postgresql

I have installed graphite with PostgreSql db (https://www.digitalocean.com/community/tutorials/how-to-install-and-use-graphite-on-an-ubuntu-14-04-server)
Everything is great and I put some data in it. My question is, can I manage data in Postgres db? I have looked for tables with data in db, but I cant find them. Where are they? I just found only these tables.
table account_profile
table account_variable
table account_view
...
table django_content_type
table tagging_tag
table tagging_taggedi
Where are sent data exactly stored? Thanks.

According to the link you posted, Graphite is using the components called 'whisper' and 'Carbon' to store the data. The actual data are stored in this database component.
PostgreSQL is used for metadata by the Django-based web-frontend.

Related

How to know the data files state?

I tried to look into data dictionary of postgresql for long time
but i didn't help.
I'm trying to know what state is the data file in, is it available for the db instance or not
photo with example
I tryed to look into pg_class table
Postgres does not have the concept of "online" (or "offline") data files.
When you create a table it creates a file for that table. For every GB of data, Postgres will add a new file. If you drop the table all files belonging to that table are removed.
So the files for a table are always "online".
For more details on how Postgres stores the data, I recommend reading the chapter Database Physical Storage in the manual.
Or read The Internals of PostgreSQL - Chapter 1: Database Cluster, Databases, and Tables

Is there any table in Postgresql, which will tell us which table was updated or modified recently?

I'm trying to load data from kafka topics to several tables in postgres. Do we have any table in postgres which will tell which table is modified or updated recently??
No. You will have to collect that information yourself, fir example using triggers.

Source of data in Redshift tables

I am looking to find the data source of couple of Tables in Redshift. I have gone through all the stored procedures in Redshift instance. I couldn't find any stored procedure which populates these tables in Redshift. I have also checked the Data Migration Service and didn't see these tables are being migrated from RDS instance. However, the tables are updated regularly each day.
What would be the way to find how data is populated in those 2 tables? Is there any logs or system tables I can look in to?
One place I'd look is svl_statementtext. That will pull any queries and utility queries that may be inserting or running copy jobs against that table. Just use a WHERE text LIKE %yourtablenamehere% and see what comes back.
https://docs.aws.amazon.com/redshift/latest/dg/r_SVL_STATEMENTTEXT.html
Also check scheduled queries in the Redshift UI console.

Data Migration from one DB to another

I have to create an app which transfer data from snowflake to postgres everyday. Some tables in postgres are truncated before migration and all data from corresponding snowflake table is copied. While for other tables, data after last timestamp in postgres is copied from snowflake.
This job has to run at night sometime and not when customers are using the service at daytime.
What is the best way to do this ?
Do you have constraints, limiting your choices in:
ETL or bulk data tooling
Development languages?
According to this site, you can create a foreign data wrapper on Postgresql for snowflake

How would you connect to two postgres databases in a sql script or a stored procedure?

I need to move some old data from one database to another - both have similar schemas. After the old rows in db1.mytable are inserted into db2.mytable - these same rows should be deleted from db1.mytable.
This is reduce db size and archive data that is not really needed that much but still important.
You should to use Foreign Data Wrapper for Postgres - https://www.postgresql.org/docs/current/static/postgres-fdw.html With foreign tables, you can send a query to another database.