Postgres crashes at memcopy() after upgrade to PG 13.

2021-03-14 Thread Avinash Kumar
Hi , In one of the environments, using pg_upgrade with hard links, PostgreSQL 12 has been upgraded to PostgreSQL 13.1. The OS was Ubuntu 16.04.7 LTS (Xenial Xerus). pg_repack was used to rebuild all the tables across the database right after the upgrade to PG 13. A new server with Ubuntu 20.04.1

Re: Postgres crashes at memcopy() after upgrade to PG 13.

2021-03-14 Thread Avinash Kumar
Hi, On Sun, Mar 14, 2021 at 10:17 PM Thomas Munro wrote: > [Dropping pgsql-general@ from the CC, because cross-posting triggers > moderation; sorry I didn't notice that on my first reply] > > On Mon, Mar 15, 2021 at 2:05 PM Avinash Kumar > wrote: > > On Sun, Mar 14

Re: Postgres crashes at memcopy() after upgrade to PG 13.

2021-03-15 Thread Avinash Kumar
Hi Thomas, On Sun, Mar 14, 2021 at 9:40 PM Thomas Munro wrote: > On Mon, Mar 15, 2021 at 1:29 PM Avinash Kumar > wrote: > > Is this expected when replication is happening between PostgreSQL > databases hosted on different OS versions like Ubuntu 16 and Ubuntu 20 ? > Or, d

Re: Postgres crashes at memcopy() after upgrade to PG 13.

2021-03-15 Thread Avinash Kumar
Hi Thomas, On Sun, Mar 14, 2021 at 10:01 PM Avinash Kumar wrote: > Hi Thomas, > > On Sun, Mar 14, 2021 at 9:40 PM Thomas Munro > wrote: > >> On Mon, Mar 15, 2021 at 1:29 PM Avinash Kumar >> wrote: >> > Is this expected when replication is happening betwe

Re: Postgres crashes at memcopy() after upgrade to PG 13.

2021-03-15 Thread Avinash Kumar
Hi, On Sun, Mar 14, 2021 at 11:24 PM Peter Geoghegan wrote: > On Sun, Mar 14, 2021 at 6:54 PM Avinash Kumar > wrote: > > Following may be helpful to understand what I meant. > > > > I have renamed the table and index names before adding it here. > > It should be p

Re: Postgres crashes at memcopy() after upgrade to PG 13.

2021-03-15 Thread Avinash Kumar
Hi, On Mon, Mar 15, 2021 at 1:18 PM Peter Geoghegan wrote: > On Mon, Mar 15, 2021 at 6:56 AM Avinash Kumar > wrote: > > psql:amchecksql.sql:17: DEBUG: leaf block 1043751 of index > "idx_id_mtime" has no first data item > > That one is harmless.

Re: Postgres crashes at memcopy() after upgrade to PG 13.

2021-03-16 Thread Avinash Kumar
On Mon, Mar 15, 2021 at 3:21 PM Avinash Kumar wrote: > Hi, > > On Mon, Mar 15, 2021 at 1:18 PM Peter Geoghegan wrote: > >> On Mon, Mar 15, 2021 at 6:56 AM Avinash Kumar >> wrote: >> > psql:amchecksql.sql:17: DEBUG: leaf block 1043751 of index >>

Re: Postgres crashes at memcopy() after upgrade to PG 13.

2021-03-16 Thread Avinash Kumar
Hi, On Tue, Mar 16, 2021 at 1:44 PM Peter Geoghegan wrote: > On Tue, Mar 16, 2021 at 5:01 AM Avinash Kumar > wrote: > > I am afraid that it looks to me like a deduplication bug but not sure > how this can be pin-pointed. If there is something I could do to determine > tha

Re: Postgres crashes at memcopy() after upgrade to PG 13.

2021-03-16 Thread Avinash Kumar
On Tue, Mar 16, 2021 at 3:08 PM Tom Lane wrote: > Peter Geoghegan writes: > > ... It's hard to believe that the problem is > > squarely with _bt_swap_posting(). > > IIUC, the problem is seen on a replica server but not the primary? > In that case, my thoughts would run towards a bug in WAL log c

Tracking Object creation or modified time !

2020-11-19 Thread Avinash Kumar
Hi All, There are currently 2 ways as per my knowledge to get the creation time (CREATE TABLE/FUNCTION/PROC/etc...) or modified time (ALTER ) of an Object. 1. Using track_commit_timestamp - Can be a slight overhead as this is applicable globally. 2. Using Event Triggers. - Does every

Do you see any problems with this procedure for Old Master rebuild as a Slave upon switchover ?

2019-04-28 Thread Avinash Kumar
Hi Team, Let us say we have a Master (M1) and a Slave (S1) in replication using Streaming Replication. I stopped all my writes from Application and i switched a WAL and made sure it is replicated to Slave. I have then shutdown M1. And ran a promote on S1. Now S1 is my new Master with a new timeli

Re: Just for fun: Postgres 20?

2020-06-04 Thread Avinash Kumar
On Tue, Jun 2, 2020 at 2:45 PM Robert Haas wrote: > On Mon, Jun 1, 2020 at 3:20 PM Tom Lane wrote: > > Robert Haas writes: > > > As has already been pointed out, it could definitely happen, but we > > > could solve that by just using a longer version number, say, including > > > the month and,

Bloom Indexes - bit array length and the total number of bits (or hash functions ?? ) !

2019-06-07 Thread Avinash Kumar
Hi All, I was testing bloom indexes today. I understand bloom indexes uses bloom filters. As i understand, a bloom filter is a bit array of m bits and a constant "k" number of hash functions are used to generate hashes for the data. And then the appropriate bits are set to 1. I was doing the fol

Re: Bloom Indexes - bit array length and the total number of bits (or hash functions ?? ) !

2019-06-09 Thread Avinash Kumar
Thanks Fabien, But the 2 direct questions i have are : 1. What is the structure of the Bloom Index ? Can you please let me know what are the fields of a Bloom Index ? Is it just the Item Pointer and BloomSignatureWord ? When i describe my bloom index it looks like following. postgres=# \d+ foo.i

Re: proposal: alternative psql commands quit and exit

2017-12-12 Thread Avinash Kumar
It takes a few hours to learn PostgreSQL and 1 second to remember, how to quit from psql. Surprised to see the depth of discussion on this. It takes sometime for a person to explore or know about PostgreSQL and install it. Likewise, it takes him some more time to understand that there exists a "ps