2830
English speaking PostgreSQL public chat. This group is for discussions on PostgreSQL-related topics and strives to provide best-effort support as well.
The wal would be all wrong as well as the xid cutoffs
Читать полностью…
Hmmm, if the OIDs are the same, that _should_ work. Did you also copy the _vm and _fsm files?
Читать полностью…
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?
It's just a matter of using pg_dump with the pattern+schema option and editing the sql manually :(
Читать полностью…
0. Backup
1. Create new table with this column
2. Copy data from old table to new one
3. Rename old table
4. Rename new table
5. Check system stability
6. Drop old table
You can't. Insert the new column at position #1 in your SELECTs. You don't SELECT *, do you? ;-)
I'd fancy if you'd not post obviously ChatGPT-generated generic stuff _after_ the discussion has moved on already. The problem is RDS related, so generic information is useless.
Actually, I'd fancy if nobody here posts ChatGPT stuff, unless it's something like "How do I teach my coworkers/customers to ask their trivial questions in ChatGPT so I can deal with the non-obvious things?". 🤓
Yes that's working but customer want old user to work
Читать полностью…
This is the error I am getting in our replication tool
Читать полностью…
Yeah, Oracle is very lax at validating the data. We found chr(0) values and others in strings.
Then you start stripping them out, and you get DUPE KEY Violations. LOL
enjoy.
Also, if you dump the data then import it, watch the CODEPAGE "CHCP" (it's best if you export and import while using the same codepage).
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
Читать полностью…
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.
Читать полностью…
Any of these approaches don't "add new column in first position in existing table" 🤷
Читать полностью…
I thought that was an answer to "what skills needed to be a middle DBA"...
(Yeah, may be he can't — however that's rather easy.
Either create table as select .... ; recreate indexes/fks/trigges... rename if you can wait some downtime or do essentially the same with the logical replicas....)
Need to add new column in first position in existing table
Читать полностью…
Install pg on several platforms, make routine backups, be able to make replicas and PITR backups, basic linux administration skills, ability to find and reconfigure postgres logs, understanding of autovacuum statistics, xid and wal horizons, and explain output.
Читать полностью…
Hi! Can you please tell me what you need to know so that you can be called a postgresql middle dba
Читать полностью…
It seems that after upgrading to PostgreSQL 16.2, the replication user is encountering permission issues when trying to access replication slots. This is likely due to role changes or new permission checks introduced in the newer version. Here’s how you can troubleshoot and potentially resolve the issue:
1. Check Replication Role: Ensure that the replication user still has the REPLICATION attribute. Run the following query:
SELECT rolname, rolreplication FROM pg_roles WHERE rolname = 'your_replication_user';
If the rolreplication column is false, you will need to grant the REPLICATION attribute: ALTER ROLE your_replication_user WITH REPLICATION;
2. Check Superuser Status: In PostgreSQL 16, additional privileges or superuser status might be required for certain operations involving replication slots. You can check if the replication user has superuser privileges:
SELECT rolname, rolsuper FROM pg_roles WHERE rolname = 'your_replication_user';
If not, you can grant superuser privileges temporarily for testing:
ALTER ROLE your_replication_user WITH SUPERUSER;
3. Check Replication Slot Permissions: PostgreSQL may require explicit permission to access or create logical replication slots. You can try re-creating the replication slot or granting necessary permissions:
GRANT USAGE ON ALL SLOTS TO your_replication_user;
Did you try to drop and create that particular replication user ?
Читать полностью…
I see that you have hosted your database on rds
So please try to grant the rds_replication access to your replication user
Only roles with the REPLICATION attribute or privileges of the "rds_replication" role may use replication slots]. Last query [select \
cast(lsn as varchar(17))from pg_create_logical_replication_slot
I am having one postgres database which was upgraded from 14.1 to 16.2 so now the issue is this was having one Replication user which was working fine but after upgradation it's giving error of permission to replication slot but all permissions are there
Читать полностью…
I can only think of a FAILED transaction or a rollback causing this.
Читать полностью…