Skip to main content
0votes
1answer
19views

Postgres Statistics for Column Scans

Where can I find statistics for specific table column scans? I have a very large table (near 10^9 rows) which has a few indexes however not on all fields. The non-indexed fields are mostly foreign ...
skywalker's user avatar
0votes
0answers
58views

PostgreSQL Trigger: Keep my_table2 column in sync with my_table1 regardless of insert order

I have two tables: my_table1 and my_table2. a_column in my_table2 should always match the corresponding value in my_table1. However, the tricky part is that rows in my_table2 may be inserted before or ...
Shh's user avatar
  • 1,016
0votes
1answer
47views

How to handle roles to dump and restore a PostgreSQL database on another database in the same cluster

I am struggling with restoring a dump for several reasons and I am not even sure I am taking the right direction. Basically my issue seems to depends on my understanding of role and priviledges in ...
imerle's user avatar
1vote
2answers
83views

Is sub-select necessary when using jsonb_to_recordset

I have been given the task of importing data from a 3rd party. Not knowing what the data would look like, I imported it into a JSON field in a PostgreSQL table. Now to make things easier, I want to ...
user2453676's user avatar
-1votes
2answers
98views

How to sum up numbers in JSONB key-values in PostgreSQL (CockroachDB)?

I have a table with rows with a JSONB in this form (YAML here for readability): { foo: 500, bar: 12 } { foo: 500, bar: 18, zoo: 5 } ... There can be arbitrary keys in the objects, but always ...
Ondra Žižka's user avatar
1vote
1answer
138views

Is WITH SELECT ... UPDATE in Postgres safe from race conditions?

I'm working in an environment where I expect several containers to be running queries to "claim" a database row. The multiple containers are for redundancy, but I only ever want one ...
halfer's user avatar
  • 20.4k
0votes
0answers
55views

What determines $libdir in PostgreSQL?

Looking at the PostgreSQL/15/data directory on a Windows machine, I found the postgresql.conf file. In the file, it has #dynamic_library_path = '$libdir' What determines what $libdir is set to and how ...
Chicken Sandwich No Pickles's user avatar
0votes
1answer
1kviews

Installing PGVector

I tried following the instructions here: https://github.com/pgvector/pgvector#windows The error message that I am getting is this: ERROR: extension "vector" has no installation script nor ...
Chicken Sandwich No Pickles's user avatar
1vote
1answer
141views

Accidentally dropped information_schema postgres

I accidentally ran and committed drop schema information_schema cascade on postgres 15.4 as a DBA. How to recreate the said schema?
puio's user avatar
  • 1,299
0votes
0answers
77views

Trying to identify possible causes of flakey postgis error on postgres

We have a postgres trigger that is set to run when eastings and northings values are inserted or updated on a row. The trigger function use postgis to transform the eastings and northings, which are ...
AbundantSalmon's user avatar
1vote
1answer
79views

Should a single update query create multiple exclusive locks on the same table in postgres (CNPG)?

My system is running instances of postgres managed using CloudNativePG; there's a primary and a couple of replicas. When I run a query like this update <table> set <boolean-column> = NOT &...
himanish.k's user avatar
1vote
0answers
255views

Postgres out-of-memory errors on Heroku stack

We're running a Rails application on Heroku, with Postgres 15.7 (on the plan Heroku Postgres standard-2) Before upgrading to Postgres 15.7, we were on 12.x with Heroku Postgres standard-0. We have ...
Jeroen's user avatar
  • 2,093
1vote
0answers
333views

Can't write to table due to multixact “members” limit exceeded (SQLSTATE 54000) after heavy inserts

The database was under sustained high load of inserts into a specific table for several hours. At some point, all inserts to that table (and some updates I tried to another table) fail with the ...
Alechko's user avatar
  • 1,620
0votes
0answers
92views

PostgreSQL server closed the connection unexpectedly - temporal_tables extension - pgAdmin4

I recently installed the PostgreSQL extension temporal_tables (v1.2.2) on our PostgreSQL database (version 15.2 installed on Microsoft Windows Server 2022 Standard - x64). Note: Installing this ...
Felix's user avatar
0votes
0answers
99views

Postgresql RDS - Error: must be member of role

I am in the middle of trying to migrate our Postgresql on an EC2 to Postgresql RDS. When I dump one of the DBs and restore it in RDS. One of the users pops up and gives "Error: must be member of ...
Joshua McDermott's user avatar

153050per page
close