<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>When we switched from UUID to integers for the PK we lost the ability to have the primary key set during bulk_create with databases other than PostgreSQL [0].</div><div><br></div><div>With a goal of database agnosticism for Pulp3, if plugin writers plan to use bulk_create with any object inherited from one of ours, they can't will get different behaviors on different databases and they won't have PKs that they may require. bulk_create is a normal django thing, so plugin writers making a django plugin should be able to use it. This concerned me already, but today it was also brought up by non-RH plugin writers also [1] in a PR.<br></div><div><br></div><div>The tradeoffs bteween UUIDs versus PKs are pretty well summed up in our ticket where we discussed that change [2]. Note, we did not consider this bulk_create downside at that time, which I think is the most significant downside to consider.</div><div><br></div><div>Having bulk_create effectively not available for plugin writers (since we can't rely on its pks being returned) I think is a non-starter for me. I love how short the UUIDs made our URLs so that's the tradeoff mainly in my mind. Those balanced against each other, I think we should switch back.</div><div><br></div><div>Another option is to become PostgreSQL only which (though I love psql) I think would be the wrong choice for Pulp from what I've heard from its users.</div><div><br></div><div>What do you think? What should we do?<br></div><div><br></div><div>[0]: <a href="https://docs.djangoproject.com/en/2.1/ref/models/querysets/#bulk-create" target="_blank">https://docs.djangoproject.com/en/2.1/ref/models/querysets/#bulk-create</a></div><div>[1]: <a href="https://github.com/pulp/pulp/pull/3764#discussion_r234780702" target="_blank">https://github.com/pulp/pulp/pull/3764#discussion_r234780702</a></div><div>[2]: <a href="https://pulp.plan.io/issues/3848" target="_blank">https://pulp.plan.io/issues/3848</a><br></div></div></div></div></div>