Re: Could not open file pg_xact/0E97

2020-07-21 Thread Radoslav Nedyalkov
Nope. It's an intensive OLAP data-warehouse with queries hanging in waits for hours. >From the vacuum full error and commit file which is gone due to the supposedly moved age mark, It looks more like a bug and not an IO error. Rado On Tue, Jul 21, 2020 at 2:38 AM Jeremy Schneider wrote: > > On

Re: Logical replication from 11.x to 12.x and "unique key violations"

2020-07-21 Thread Tom Lane
Thomas Kellerer writes: > Tom Lane schrieb am 20.07.2020 um 20:04: >> Yeah, duplicate keys does seem odd here. Can you provide a self >> contained example? > I'll try, but this is a production system. > Extracting the necessary anonymous data will be tricky. If this is a PG bug, it should be po

Re: Logical replication from 11.x to 12.x and "unique key violations"

2020-07-21 Thread Thomas Kellerer
Tom Lane schrieb am 21.07.2020 um 09:39: > In any case, we do offer as standard advice that you should reproduce > a problem on the latest minor release before filing a bug report. I know ;) I already told the "powers to be" and it's being addressed (I also went through the 11.x release notes, bu

Re: How to restore a dump containing CASTs into a database with a new user?

2020-07-21 Thread Thorsten Schöning
Guten Tag Christophe Pettus, am Montag, 20. Juli 2020 um 19:21 schrieben Sie: > On a database with multiple users, you can't just get away > with changing the ownership of the types; you have to make sure that > the USAGE is granted appropriately to other users. If a user specifies "--no-owner" a

Re: Multitenent architecture

2020-07-21 Thread Vasu Madhineni
Hi All, Our project uses each database for tenant, But how can we restrict tenant resources? Ex: Tenent1 has to use 20% resource and Tenent2 has to use 10% resource, how can we restrict users like this. Thanks and Regards, Vasu Madhineni On Mon, Jun 8, 2020 at 2:50 PM Laurenz Albe wrote: > On

Re: Logical replication from 11.x to 12.x and "unique key violations"

2020-07-21 Thread Adrian Klaver
On 7/20/20 10:42 PM, Thomas Kellerer wrote: Adrian Klaver schrieb am 20.07.2020 um 16:45: On 7/20/20 7:22 AM, Thomas Kellerer wrote: I have a strange error when using logical replication between a 11.2 Where is "xxx_pkey" coming from, e.g. sequence? No, as mentioned, those are varchar(2

Switching Primary Keys to BigInt

2020-07-21 Thread Mohamed Wael Khobalatte
Hi all, We are running 9.6, and we are planning to move some primary keys from int to bigint because we are approaching the type limit. We understand this requires some downtime, but we want to know if there are things we can do to limit it. Here are our steps, with questions at the end. ALTER T

Pgpool in docker container

2020-07-21 Thread Vasu Madhineni
Hi All, Planning to build standalone postgres and with pgpool as connection pooler in docker containers. Shall we try option like installing pgpool in one docker container and postgres in another docker container, is it possible? Thanks in advance. Regards, Vasu Madhineni

Re: Multitenent architecture

2020-07-21 Thread Michel Pelletier
On Tue, Jul 21, 2020 at 7:47 AM Vasu Madhineni wrote: > Hi All, > > Our project uses each database for tenant, But how can we restrict > tenant resources? > Ex: Tenent1 has to use 20% resource and Tenent2 has to use 10% resource, > how can we restrict users like this. > See https://wiki.postgres

Re: Switching Primary Keys to BigInt

2020-07-21 Thread Adrian Klaver
On 7/21/20 8:30 AM, Mohamed Wael Khobalatte wrote: Hi all, We are running 9.6, and we are planning to move some primary keys from int to bigint because we are approaching the type limit. We understand this requires some downtime, but we want to know if there are things we can do to limit it.

Re: Switching Primary Keys to BigInt

2020-07-21 Thread Adrian Klaver
On 7/21/20 11:17 AM, Adrian Klaver wrote: On 7/21/20 8:30 AM, Mohamed Wael Khobalatte wrote: Hi all, > test_(aklaver)5432> alter table change_seq alter COLUMN id set data type bigint; ALTER TABLE test_(aklaver)5432> \d change_seq     Table "public.change_seq"  Colum

Re: Switching Primary Keys to BigInt

2020-07-21 Thread Michael Lewis
Curious- what requires that the unique index be declared a primary key? What advantage does that give you? Just ensuring it isn't null? Side note- EOL for 9.6 is coming next year so just a plug for upgrading when possible, perhaps utilizing pglogical to get to v11 or 12. >

Re: Switching Primary Keys to BigInt

2020-07-21 Thread Mohamed Wael Khobalatte
> > test_(aklaver)5432> alter table change_seq alter COLUMN id set data type > bigint; > ALTER TABLE > test_(aklaver)5432> \d change_seq > Table "public.change_seq" > Column | Type | Collation | Nullable |Default > ++---+

Re: Switching Primary Keys to BigInt

2020-07-21 Thread Adrian Klaver
On 7/21/20 2:18 PM, Mohamed Wael Khobalatte wrote:   > test_(aklaver)5432> alter table change_seq alter COLUMN id set data type bigint; ALTER TABLE test_(aklaver)5432> \d change_seq       Table "public.change_seq"    Column |  Type  | Collation | Nullable |   

Re: Switching Primary Keys to BigInt

2020-07-21 Thread Mohamed Wael Khobalatte
> Yeah, I thought the int --> bigint would not do a table rewrite. Testing > showed otherwise. Forget that idea. Got it. Not sure what else we should consider. It seemed like the constraint might be possible, but currently need a far bigger table to be able to tell for sure, since we can't explain

Re: Pgpool in docker container

2020-07-21 Thread Srinivasa T N
On Tue, Jul 21, 2020 at 10:46 PM Vasu Madhineni wrote: > Hi All, > > Planning to build standalone postgres and with pgpool as connection pooler > in docker containers. > Shall we try option like installing pgpool in one docker container and > postgres in another docker container, is it possible?

Re: Logical replication from 11.x to 12.x and "unique key violations"

2020-07-21 Thread Thomas Kellerer
Adrian Klaver schrieb am 21.07.2020 um 17:07: >> No, as mentioned, those are varchar(20) columns. >> The values are generated by the application (no default value defined for >> the column) > > Aah I see my mistake I was going off your follow up question not the > original post. In that original p