Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
757 views

i'am using this query to determite hit/read value for my databases SELECT datname, CASE WHEN blks_read = 0 THEN 0 ELSE blks_hit / blks_read END AS ratio FROM pg_stat_database; ...
Drilla's user avatar
  • 119
0 votes
0 answers
1k views

I am currently upgrading a Postgres cluster running on a Centos machine from version 9.6.22 to 12.7. Post the install of 12.7 binaries, I am running the pg_upgrade command: /usr/pgsql-12/bin/...
Dhanush D's user avatar
11 votes
3 answers
11k views

I can view the total size of all indexes in a table with SELECT pg_size_pretty (pg_indexes_size('table_name')); and the size of a specific index with: select pg_size_pretty(pg_relation_size('...
Z. M.'s user avatar
  • 389
0 votes
0 answers
88 views

Postgresql12 I am trying to fix a schema's sequences, but for some reason this yields attributes from other tables in some cases. I assume I am leaving out something in the where clause that isn't ...
LiteWait's user avatar
  • 634
3 votes
2 answers
2k views

I have a sql data (table) which consists of n number of columns, but 3 are of particular interest claim_id patient_id admission_date 1 p_1 2001-01-01 2 p_2 2001-02-01 3 p_1 2001-01-01 4 p_3 2001-02-02 ...
AnilGoyal's user avatar
  • 26.3k
2 votes
3 answers
2k views

We are backing up 1TB+ of postgres database using barman. Barman is backing up full database daily. Every day we are dumping 1TB+ database. So it's consuming huge space. We have following ...
user avatar
1 vote
1 answer
402 views

Understand from: https://www.enterprisedb.com/edb-docs/d/edb-postgres-advanced-server/user-guides/user-guide/11/EDB_Postgres_Advanced_Server_Guide.1.80.html that PL/Java is deprecated in Advanced ...
Jacky's user avatar
  • 11
0 votes
1 answer
417 views

I have a column of a database table that is of type JSONB and I'm wanting to get some data from that column. For the most part the column is a flat list of key \ value pairs. Ex: { s_key: 'value', ...
B-M's user avatar
  • 1,288
0 votes
1 answer
76 views

I have to log all such queries to my database on Amazon RDS The best way, of course, create a trigger on pg_catalog.pg_authid, but I have no privileges to operate system catalog. Any advice?
FlyBot's user avatar
  • 316
1 vote
1 answer
2k views

[Issue resolved. See Answer below.] I have just encountered a series of “duplicate key value violates unique constraint” errors with a system that has been working well for months. And I cannot ...
Gurtz's user avatar
  • 303
1 vote
1 answer
276 views

According to the documentation, pg_attribute.attgenerated is typed as char and has a value of "a zero byte" if the column is not generated, and there is at least one other possible value, ...
Mason Wheeler's user avatar
0 votes
1 answer
421 views

I am trying to determine what "level" of a ROLLUP report each given row belongs to. When initial data contains no NULLs, then it is possible just count nulls in every row (amount of null ...
diziaq's user avatar
  • 7,895
4 votes
1 answer
3k views

PostgreSQL v12.6 DBEaver 7.1.0 How to set SQL script parameters in DBeaver or PgAdmin? (any working option is welcome) This script works perfectly when I run it as a script on DB initialization (i.e. ...
diziaq's user avatar
  • 7,895
0 votes
1 answer
116 views

t - current db table table1 - other db database - current db table where the "other db" credentials are stored SELECT t.* FROM "database" d, t, dblink_exec( ...
user1720827's user avatar
0 votes
1 answer
39 views

I'm doing an inner join on a table like this: SELECT * FROM patient p INNER JOIN vaccine v ON p.vaccine_id = v.id The condition f.vac_1 = mv.id might not been satisfied in the case ...
Hey StackExchange's user avatar
2 votes
1 answer
2k views

The title is pretty much self-explanatory. To illustrate more, here's a picture: [Live Database]-->(physical replication)-->[Physical Replica]-->(logical replication)-->[Logical Replica] ...
Denis Arharov's user avatar
3 votes
2 answers
702 views

I have a generated column in PostgreSQL 12 defined as create table people ( id bigserial primary key, a varchar, b boolean generated always as (a is not null) stored ); but now i want column ...
zolamk's user avatar
  • 6,587
1 vote
1 answer
2k views

sudo psql -f sample-schema.sql -U postgres -p 5432 -h my ipaddress -d dbname How to specify into what schema the data go?
Jack Clarkson's user avatar
5 votes
2 answers
3k views

Example (fake) case: indexing a column containing e-mails (text type) when the column will exclusively be queried for an exact string match, ex. SELECT * FROM mytable WHERE email = '[email protected]' Do ...
Z. M.'s user avatar
  • 389
1 vote
2 answers
225 views

I am trying to create a procedure with a wildcard with postgresql unfortunately I do not have any success. It looks like the postgresql versions have different ways of creating procedures, however, I ...
Herc01's user avatar
  • 622
1 vote
1 answer
357 views

Why my newly created postgres RDS has constant read/write IOPS plus CPU utilization? I didn't use the rds in any of my app, nor does it open to public network. And I am just using the default param ...
jack2684's user avatar
  • 380
1 vote
1 answer
2k views

I am trying to connect to a remote postgresql database using the bitnami/phppgadmin docker How to mention the host name phppgadmin: image: "bitnami/phppgadmin:7.13.0" ports: -...
Santhosh's user avatar
  • 12k
0 votes
1 answer
556 views

I am getting the following error when trying to import a raster image to a PostGIS DB using raster2pgsql. ERROR: current transaction is aborted, commands ignored until end of transaction block I have ...
Jaun van Loggerenberg's user avatar
0 votes
2 answers
2k views

I have a table with a time column defined as time TIMESTAMP DEFAULT CURRENT_TIMESTAMP my database and the server have the timezone UTC Tue Apr 20 18:22:50 UTC 2021 When I ran the following query ...
kp123154135's user avatar
1 vote
3 answers
283 views

My database is structured with a schema per application user. In each schema there is an identical table named "entries" with the exact same DDL. I also have a common schema that hosts some ...
Paralife's user avatar
  • 6,264

1
3 4
5
6 7
13