Re: AW: AW: posgres 12 bug (partitioned table)

From: Pavel Biryukov <79166341370(at)yandex(dot)ru>
To: Wilm Hoyer <w(dot)hoyer(at)dental-vision(dot)de>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: AW: AW: posgres 12 bug (partitioned table)
Date: 2020-08-12 11:08:15
Message-ID: 1036021597230120@mail.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

<div>Wilm,</div><div> </div><div>For different developers to begin some "adoptation" there should be a clear "Breaking changes" record in Postgres version history.</div><div> </div><div>For now we consider it bug (worked before, not working now), that should be just fixed...</div><div> </div><div>-- <br />С уважением, Павел</div><div> </div><div> </div><div> </div><div>12.08.2020, 13:57, "Wilm Hoyer" &lt;w(dot)hoyer(at)dental-vision(dot)de&gt;:</div><blockquote><div lang="DE"><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm"> </p><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm">&gt; Wilm,</p></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm"> </p></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm">&gt; Have a look, there is even an extension method for xmin (stable branch):</p></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm"> </p></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm">&gt; <a href="https://github.com/npgsql/efcore.pg/blob/stable/src/EFCore.PG/Extensions/NpgsqlEntityTypeBuilderExtensions.cs"> https://github.com/npgsql/efcore.pg/blob/stable/src/EFCore.PG/Extensions/NpgsqlEntityTypeBuilderExtensions.cs</a></p></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm"> </p></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm">&gt; EF Core is mostly independent from DB, but there usually are some "tweaks" for each database that you should know (like for SQL server the native concurrency token should be like byte[]:</p><ol type="1" style="margin-bottom:0cm;margin-top:0cm"><li style="box-sizing:border-box;color:#333333;font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm"><code style="font-family:'courier new'"><span style="background:#f9f9f9;color:#666600;font-family:'consolas';font-size:10pt">[</span><span style="background:#f9f9f9;color:#555555;font-family:'consolas';font-size:10pt">TimeStamp</span><span style="background:#f9f9f9;color:#666600;font-family:'consolas';font-size:10pt">]</span></code></li><li style="background:#f9f9f9;box-sizing:border-box;color:#333333;font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm"><code style="font-family:'courier new'"><span style="background:#f9f9f9;color:blue;font-family:'consolas';font-size:10pt">public</span><span style="background:#f9f9f9;color:black;font-family:'consolas';font-size:10pt"> </span><span style="background:#f9f9f9;color:blue;font-family:'consolas';font-size:10pt">byte</span><span style="background:#f9f9f9;color:#666600;font-family:'consolas';font-size:10pt">[]</span><span style="background:#f9f9f9;color:black;font-family:'consolas';font-size:10pt"> </span><span style="background:#f9f9f9;color:#555555;font-family:'consolas';font-size:10pt">RowVersion</span><span style="background:#f9f9f9;color:black;font-family:'consolas';font-size:10pt"> </span><span style="background:#f9f9f9;color:#666600;font-family:'consolas';font-size:10pt">{<!-- --></span><span style="background:#f9f9f9;color:black;font-family:'consolas';font-size:10pt"> </span><span style="background:#f9f9f9;color:blue;font-family:'consolas';font-size:10pt">get</span><span style="background:#f9f9f9;color:#666600;font-family:'consolas';font-size:10pt">;</span><span style="background:#f9f9f9;color:black;font-family:'consolas';font-size:10pt"> </span><span style="background:#f9f9f9;color:blue;font-family:'consolas';font-size:10pt">set</span><span style="background:#f9f9f9;color:#666600;font-family:'consolas';font-size:10pt">;</span><span style="background:#f9f9f9;color:black;font-family:'consolas';font-size:10pt"> </span><span style="background:#f9f9f9;color:#666600;font-family:'consolas';font-size:10pt">}</span></code></li><li style="background:#f9f9f9;box-sizing:border-box;color:#333333;font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm"><code style="font-family:'courier new'"><span style="background:#f9f9f9;color:#666600;font-family:'consolas';font-size:10pt">)</span></code></li></ol></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm"> </p></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm">&gt; Additional "self defined column" for billion rows tables leads to additional space needed. We use partitioning when the tables are LARGE :)</p></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm"> </p></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm">&gt; This works fine in 10, 11, it's strange it is broken in 12 (from db users point of view, I haven't examined the sources of PG for internals...)</p></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm"> </p></div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm">Sorry, i had not looked into the extension since it is not part of core npgsql. As it states: Npgsql.EntityFrameworkCore.PostgreSQL is an Entity Framework Core provider built on top of <a href="https://github.com/npgsql/npgsql">Npgsql</a>. (and we left npgsql before this extension was started).</p><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm">I guess it would be easy for them to implement a solution, because that basically means adopting the relevant part from the EF SqlServer implementation. But i fear you’re out of luck with them, as support for table partitioning is still an open issue in their project.</p><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm"> </p><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm">Best regards</p><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0cm">Wilm.</p></div></div></div></blockquote>

Attachment Content-Type Size
unknown_filename text/html 5.8 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-08-12 12:41:11 Re: BUG #16578: When making an insert, the database goes to recover mode
Previous Message Wilm Hoyer 2020-08-12 10:57:49 AW: AW: posgres 12 bug (partitioned table)

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2020-08-12 12:11:12 Re: Allows Extend Protocol support CURSOR_OPT_HOLD with prepared stmt.
Previous Message Wilm Hoyer 2020-08-12 10:57:49 AW: AW: posgres 12 bug (partitioned table)