Re: OID out of range

2020-01-15 Thread Rob Sargent
> On Jan 15, 2020, at 12:17 PM, Konireddy Rajashekar > wrote: > > @Alvaro Herrera, Can i alter the datatype of relid to oid and try ? > Not if Alvaro’s theory is correct. List that column, check for nulls, values greater the 2^32.

Re: OID out of range

2020-01-15 Thread David G. Johnston
Please don't top-post here. On Wed, Jan 15, 2020 at 12:01 PM Konireddy Rajashekar < rajkonire...@gmail.com> wrote: > tried casting to text,varchar but no luck > select u.relid,c.relnamespace::regnamespace::text,c.relname,now() as > current_time,pg_size_pretty(pg_relation_size(c.oid)) as > curren

Re: OID out of range

2020-01-15 Thread Konireddy Rajashekar
@Alvaro Herrera, Can i alter the datatype of relid to oid and try ? On Thu, Jan 16, 2020 at 12:41 AM Alvaro Herrera wrote: > On 2020-Jan-15, Konireddy Rajashekar wrote: > > > rangetest-# \d user_tables_sizes > > Table "user_tables_sizes" > >Column|Type

Re: OID out of range

2020-01-15 Thread Alvaro Herrera
On 2020-Jan-15, Konireddy Rajashekar wrote: > rangetest-# \d user_tables_sizes > Table "user_tables_sizes" >Column|Type | Collation | Nullable | Default > -+-+---+--+- > relid

Re: OID out of range

2020-01-15 Thread Konireddy Rajashekar
tried casting to text,varchar but no luck select u.relid,c.relnamespace::regnamespace::text,c.relname,now() as current_time,pg_size_pretty(pg_relation_size(c.oid)) as current_size,pg_size_pretty(u.table_size) as previous_size,pg_size_pretty(pg_relation_size(c.oid) - pg_relation_size(u.table_size))

Re: OID out of range

2020-01-15 Thread David G. Johnston
On Wed, Jan 15, 2020 at 11:36 AM bhargav kamineni wrote: > Any workaround to make it work ? > Convert both to text and join on that? Curious choice making relid numeric... David J.

Re: OID out of range

2020-01-15 Thread bhargav kamineni
Any workaround to make it work ? On Thu, 16 Jan 2020 at 00:00, Adrian Klaver wrote: > On 1/15/20 10:18 AM, Konireddy Rajashekar wrote: > > I am getting ERROR: OID out of range while firing below SQL , what could > > be the reason? I am joining pg_class and one user_created table to > > compare t

Re: OID out of range

2020-01-15 Thread Adrian Klaver
On 1/15/20 10:18 AM, Konireddy Rajashekar wrote: I am getting ERROR: OID out of range while firing below SQL , what could be the reason? I am joining pg_class and one user_created table to compare tables size. select u.relid,c.relnamespace::regnamespace::text,c.relname,now() as current_time,

OID out of range

2020-01-15 Thread Konireddy Rajashekar
I am getting ERROR: OID out of range while firing below SQL , what could be the reason? I am joining pg_class and one user_created table to compare tables size. select u.relid,c.relnamespace::regnamespace::text,c.relname,now() as current_time,pg_size_pretty(pg_relation_size(c.oid)) as current_siz

Re: Problem with SqlState=23505 when inserting rows

2020-01-15 Thread Michael Lewis
On Wed, Jan 15, 2020 at 9:41 AM Werner Kuhnle wrote: > I've tried to using the newer definition: > id int GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY > but that does not solve the problem. > > Is there a way to define id columns to that when the database provides > values, > it recognizes alread

Re: Problem with SqlState=23505 when inserting rows

2020-01-15 Thread Adrian Klaver
On 1/15/20 8:40 AM, Werner Kuhnle wrote: Hi, I'm new to pg and want to port an application and database from ms sql to pg v12. Together with my application a database containing initial standard data which is needed by the application is also installed. This is done via execution of SQL scri

Re: Upgrading from 9.6 to 12

2020-01-15 Thread Adrian Klaver
On 1/15/20 8:19 AM, Kasun Kulathunga wrote: Hello, We're currently in the beginning phases of a project to upgrade our Postgres cluster from 9.6 to a newer version (most likely v12). This is actually going to be a two part move since we're going to move from a RHEL-backed cluster to an Ubunt

Problem with SqlState=23505 when inserting rows

2020-01-15 Thread Werner Kuhnle
Hi, I'm new to pg and want to port an application and database from ms sql to pg v12. Together with my application a database containing initial standard data which is needed by the application is also installed. This is done via execution of SQL scripts. Every table of the db has an id col

Upgrading from 9.6 to 12

2020-01-15 Thread Kasun Kulathunga
Hello, We're currently in the beginning phases of a project to upgrade our Postgres cluster from 9.6 to a newer version (most likely v12). This is actually going to be a two part move since we're going to move from a RHEL-backed cluster to an Ubuntu server-backed one. I was wondering if there ar

Re: Lock acquisition for partition table when setting generic plan

2020-01-15 Thread Tom Lane
"yotsunaga.na...@fujitsu.com" writes: > I did the following. > Even though I accessed one partition table(test2 table), I also acquired > locks on other partition tables(test1 table). > I expected to acquire locks on the parent table(test table) and the partition > table to access(test2 table).