News for hackers. Stuff that matters.
Re:How to Get the Most Out of Postgres Memory Settings by NortySpock on Wednesday June 12, 2024 @01:18PM (#40660587)
Yeah, but that requires basically a special favor from the DBA to create the trigger for what feels like a basic, common-enough data-load task...

What I normally see though is that the auto-incrementing sequence (at least in MS SQL Server or Oracle) isn't clever enough to say "wow, that id already exists on your table somehow? Here let me bump the sequence again and you try again with a higher ID..."

Instead you get a 2am alarm because the generated sequence somehow ran into the block of IDs that you inserted into the table and crashed with a PK unique constraint violation.

Hence UUIDv7 or ULIDs being easy to insert from the temp table into the main table.

Re:How to Get the Most Out of Postgres Memory Settings by hot_gril on Wednesday June 12, 2024 @08:40PM (#40664744)
It's easier if you have a non-PK UUID column you can use as a crutch.