pg_sql | Unsorted

Telegram-канал pg_sql - PostgreSQL

2830

English speaking PostgreSQL public chat. This group is for discussions on PostgreSQL-related topics and strives to provide best-effort support as well.

Subscribe to a channel

PostgreSQL

You seem to have a misconception there. If *you* don't define an ID, your record doesn't have any. The tinme where each tuple had an OID are *long* gone...

Читать полностью…

PostgreSQL

I repeat: "Which ID?"

Читать полностью…

PostgreSQL

Which ID?
If you mean foreign key constraints, those are visible in e.g. the psql \d output:

demo=> create table a (id int primary key);
CREATE TABLE
demo=> create table b (id int, fk_a int references a(id));
CREATE TABLE
demo=> \d a
Table "public.a"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
id | integer | | not null |
Indexes:
"a_pkey" PRIMARY KEY, btree (id)
Referenced by:
TABLE "b" CONSTRAINT "b_fk_a_fkey" FOREIGN KEY (fk_a) REFERENCES a(id)

demo=>


And to find the dependent records, you can simply JOIN the tables... ;-)

Читать полностью…

PostgreSQL

Also, you can study pg_depend and pg_shdepend relations, this way you can get OIDs of relations owned by role

Читать полностью…

PostgreSQL

How to find out list objects to reassign them to other user/role

Читать полностью…

PostgreSQL

Hi Experts, Any idea how to drop any role/user in postgresql,  while I am droping role/user I am getting 120 objects are dependent on <dbname> and in another db it is showing many privileges of table are dependent. I tried with few queries to identify from internet object/grant list which are dependent on that role/user. But no luck...

Читать полностью…

PostgreSQL

This is not the place. But Duo Lingo is a free phone app. I am using it to learn Russian.

Читать полностью…

PostgreSQL

I'd like more to implement a database restore in an existing cluster.

Читать полностью…

PostgreSQL

Probably easier to implement an AM that uses an undo log instead 😏🤪

Читать полностью…

PostgreSQL

PG 17 was released ~ 1.5 hours ago 🍾

Читать полностью…

PostgreSQL

Rigth! Well, the frozen bit could be set everywhere ;-)

Читать полностью…

PostgreSQL

Yeah that was the issue that came to my mind

Читать полностью…

PostgreSQL

No they are not the same

Читать полностью…

PostgreSQL

Ideally it should be a matter of moving the files following the OID of the table and related matters, but I wasn't able to make it work

Читать полностью…

PostgreSQL

I know for a fact that there are patches in the work that will actually allow us to do that. But the current state of the catalog just doesn't cut it.

Читать полностью…

PostgreSQL

Record's id that is used in other tables.

Читать полностью…

PostgreSQL

I actually meant finding all tables that reference that specific record by its ID, not just foreign keys. Is there a way to find all the tables where that record is used?

Читать полностью…

PostgreSQL

Hi everyone, is there a way in PostgreSQL to find the dependent tables and columns for a record based on its id?

Читать полностью…

PostgreSQL

You don't have to. You simply REASSIGN OWNED BY $role TO ?? and then drop role

Читать полностью…

PostgreSQL

You can use REASSIGN OWNED to reassign any objects owned by one role to another. It's specifically to allow you to then drop the role you did the reassign on.

Читать полностью…

PostgreSQL

Dear team,
I am looking for a comprehensive document or suggestions on best practices for the end-to-end setup of PostgreSQL 16 on a new server, including installation, replication setup, monitoring tool configuration, and backup strategy. If anyone has such documentation or can provide insights, it would be greatly appreciated.
Thank you.

Читать полностью…

PostgreSQL

Is there anyone who can help me improve my English speaking skills?

Читать полностью…

PostgreSQL

https://www.postgresql.org/about/news/postgresql-17-released-2936/

and here is the full release notes:
https://www.postgresql.org/docs/17/release-17.html

Читать полностью…

PostgreSQL

1) It requires to really set that everywhere.
2) I doubt that frozen-deleted isn't well-tested and may involve xid clash. Generally safer would be to rewrite xids completely/

3) I thought to write such an importer... Somwtimes. Some global objects should be checked: users, tablespaces...

Читать полностью…

PostgreSQL

Alas! even dicussing this could lead a lot of people coming here to wrong ideas.

*DON'T* try this at home, kids!

Читать полностью…

PostgreSQL

The wal would be all wrong as well as the xid cutoffs

Читать полностью…

PostgreSQL

It shouldn't. Xids are different.

Читать полностью…

PostgreSQL

Hmmm, if the OIDs are the same, that _should_ work. Did you also copy the _vm and _fsm files?

Читать полностью…

PostgreSQL

Two clusters, exact same schema, exact same binaries and platform

How come there is not a way to just move the data from one to the other without pg_dump?

Читать полностью…

PostgreSQL

Maybe if you do it in a transaction 🤪

Читать полностью…
Subscribe to a channel