Problems with MemoryContextSwitchTo ()

2020-09-15 Thread Yessica Brinkmann
Hello. I think several of you will already remember me. I'm the one with the IndexAdviser topic. Only that I changed my email address. As you may recall, I am doing my thesis on the subject of IndexAdviser modifications. I really appreciate the help they have given me in various Postgresql groups.

How to calculate shared memory size

2020-09-15 Thread Rébeli-Szabó Tamás
Hello all, I want to do a proper calculation of the number of huge pages needed for PostgreSQL to start. For that I need to know how much shared memory will be allocated at startup. Looking at the shared memory calculation in the source (ipci.c), I can see that two terms stand out: siz

How to calculate shared memory size

2020-09-15 Thread Rébeli-Szabó Tamás
Hello all, I want to do a proper calculation of the number of huge pages needed for PostgreSQL to start. To do that, I need a good approximation of how much shared memory will be requested at server startup. Looking at the shared memory calculation in the source (ipci.c), I can see that tw

Re: multiple tables got corrupted

2020-09-15 Thread Magnus Hagander
Try reading them "row by row" until it breaks. That is, SELECT * FROM ... LIMIT 1, then LIMIT 2 etc. For more efficiency use a binary search starting at what seems like a reasonable place looking at the size of the table vs the first failed block to make it faster, but the principle is the same. On

Re: How to calculate shared memory size

2020-09-15 Thread Tom Lane
=?UTF-8?Q?R=C3=A9beli-Szab=C3=B3_Tam=C3=A1s?= writes: > I want to do a proper calculation of the number of huge pages needed for > PostgreSQL to start. > For that I need to know how much shared memory will be allocated at > startup. TBH, the only method that's not going to break over time is "s

Re: multiple tables got corrupted

2020-09-15 Thread Vasu Madhineni
Is it possible to identify which rows are corrupted in particular tables. On Tue, Sep 15, 2020 at 5:36 PM Magnus Hagander wrote: > > > On Tue, Sep 15, 2020 at 11:15 AM Vasu Madhineni > wrote: > >> Hi All, >> >> In one of my postgres databases multiple tables got corrupted and >> followed the be

Re: multiple tables got corrupted

2020-09-15 Thread Magnus Hagander
On Tue, Sep 15, 2020 at 11:15 AM Vasu Madhineni wrote: > Hi All, > > In one of my postgres databases multiple tables got corrupted and followed > the below steps but still the same error. > > 1.SET zero_damaged_pages = on > 2. VACUUM ANALYZE, VACUUM FULL > but still same error. > That is a very

multiple tables got corrupted

2020-09-15 Thread Vasu Madhineni
Hi All, In one of my postgres databases multiple tables got corrupted and followed the below steps but still the same error. 1.SET zero_damaged_pages = on 2. VACUUM ANALYZE, VACUUM FULL but still same error. moh_fa=# VACUUM FULL; ERROR: could not read block 9350 in file "base/1156523/1270812":