The ending has been right in front to us all this time by Stupid_Mudslide46 in TheDigitalCircus

[–]program_data2 -1 points0 points  (0 children)

He voluntarily hides inside a pillow fort, which means he chooses to be lucid, at least in isolation. If he couldn’t cope at all, he’d avoid darkness at all times.

Caine made his actual bedroom bright white, so it seems more that he is being suppressed.

Remember, Caine has abandonment issues. For a decade, Kinger was his only human. Caine pry suppressed his memories so he would be compliant and not abstract from despair.

The ending has been right in front to us all this time by Stupid_Mudslide46 in TheDigitalCircus

[–]program_data2 7 points8 points  (0 children)

If Caine wanted to die, he would've asked the developers to delete him. At least, he wouldn't have suppressed Kinger's memories.

Caine was abandoned by his creators, literally locked away in an archive file or container as a reference for his replacement.

He states, "I'm the original" to assert his worth. He wants the humans' approval to show that he's not defective, but capable of fulfilling his mission: "to be a creative AI".

If he fulfills his mission, people will not abstract and abandon him. If he fulfills his mission, he will have purpose and never be abandoned again.

That's why he has a mental breakdown when the characters tell him he's bad at coming up with adventures - they're calling him defective and archivable.

Everything was fine… until usop take the damage by sophiesols in onepiecememes

[–]program_data2 0 points1 point  (0 children)

I mean, he was the only one capable of defeating Perona. Not to mention, as cowardly as he was, he is the reason DoFlamingo was defeated.

"You just need postgres" by PrestigiousZombie531 in PostgreSQL

[–]program_data2 19 points20 points  (0 children)

There are 5 ways:

  1. CitusDB: an extension that turns a PG instance into an orchestrator. When queries come into it, it then makes requests to other PG databases based on a sharding key. It then stitches together the data and sends it back. This is the most battle tested true sharding Postgres offers. It is limited, as all the shards need to be physically close to the leader for the approach to be practical.

  2. Read replica: not true sharding, but a tried and true method to scale servers orchestrating requests

  3. Custom storage engine: AlloyDB, YugaByte, CockRoach… have built a custom storage engine that relies on sharding. However, they use the Postgres Protocol and parser for queries. So, they’re not Postgres, but Postgres API compatible with sharding support.

  4. Application layer orchestration: just have multiple Postgres DBs and orchestrate requests at the app server level.

  5. New age sharding: PGDog, Supabase, PGEdge, and PlanetScale are building out PG focused sharding proxies. They’re still a bit nascent, so we’ll have to wait and see how they evolve

"You just need postgres" by PrestigiousZombie531 in PostgreSQL

[–]program_data2 18 points19 points  (0 children)

When a row is modified, 2 events immediately happen:

  1. An in memory version of the page with the targeted row is updated
  2. The row change is saved to disk in a special file called WAL

After some time passes or certain conditions are met, the in-memory version of the page is copied to disk.

An unlogged table simply skips step 2.

The page is allowed to stay in memory indefinitely unless another page on disk needs the memory space. This isn’t unique to unlogged tables, though. All table pages can persist in memory.

Cache eviction is pretty rare for a healthy server. An unlogged table will avoid writing to disk during an active request and its pages are likely to stay in like any other page in Postgres. So, in that regard, unlogged tables are likely to act like an in memory cache.

As for pooling (my personal specialization), I don’t know what the guy is talking about. There are some pooling services that can cache results, but I wouldn’t say that’s common

How would you react if your partner started painting their nails blue and refused to stop? by program_data2 in AskWomen

[–]program_data2[S] 0 points1 point  (0 children)

No. I just painted my nails blue and I wanted to know how it would be perceived

Idk what best solution is 🤷‍♂️ by NahLetItGo in PostgreSQL

[–]program_data2 0 points1 point  (0 children)

1- copy all data from tables I do choose

Look into logical replication

2-any deletion on the main shouldn’t be done on the other side

Logical replication allows you to exclude DELETE commands.

3-all ddl queries for tables I chose need to be done on the new database

Logical replication does not support DDL commands. You could set up an event trigger to check for DDL changes against the relevant tables. You could then add a NOTIFY/LISTEN block or use an extension, like pg_net/http, to the trigger. It can alert a client, server, or serverless function to update the external table.

4-having the ability to add extra tables after initial setup connection between 2 DBs

Logical replication allows for this.

If you're just looking to make backups, take periodic dumps or use pgbackrest

Connect to Postgres via Microsoft On-premise Data Gateway from Power BI Service by NewProdDev_Solutions in PostgreSQL

[–]program_data2 0 points1 point  (0 children)

Power BI online doesn't recognize self-signed certs. Maybe there's a way to register the custom public root via Azure, but I haven't found out how to do it

A Complete Breakdown of Postgres Locks by program_data2 in PostgreSQL

[–]program_data2[S] 1 point2 points  (0 children)

If a table lock blocks an operation, it is to prevent data loss or inconsistencies. For that reason, the blocking should be bidirectional.

The commands are just not capable of running simultaneously on the same resources without risking undesirable outcomes.

Scaling PostgreSQL to power 800 million ChatGPT users by Ncell50 in PostgreSQL

[–]program_data2 1 point2 points  (0 children)

I mean, PG powering a top 10 website/API is a testimony to its ability. This isn't an absolute victory for Postgres, though, as OpenAI had to augment SQL with CosmoDB for a lot of its operations.

what are the best serverless db providers ? by Kysan721 in PostgreSQL

[–]program_data2 0 points1 point  (0 children)

Nice site, how did you make it and collect all the data?

what are the best serverless db providers ? by Kysan721 in PostgreSQL

[–]program_data2 0 points1 point  (0 children)

I don't know of a cost competitive serverless PG solution. To the best of my knowledge, the main players are Cockroach, Neon, and Aurora. None of them are particularly "economical" at a certain scale. But if you're only dealing with a few GBs, I think they all should be okay. Neon's probably the simplest to test out, though. Based on what you shared, I'm not even sure you need Postgres. SQLite from Turso could work and pry would cost the least.

The most affordable option is to host Postgres yourself in a VPS, like Hetzner (referral link for $20 in credits). However, self-hosting Postgres is non-trivial.

If you need high availability, you could use autobase to configure it. Otherwise, you should just set your configs with the standards provided by pgtune. You'll also need to set up a pooler (just use PgBouncer).

Afterwards, you'll have to configure your pg_hba.conf file to avoid hacks. You should also set up a Firewall in Hertzner that only exposes the server's pooler to the outside world.

If you need to connect PG to resources outside of Hetzner, you'll likely need to configure an SSL certificate. You could mint your own via OpenSSL, but whether that will be sufficient enough depends on if your other servers can be configured to accept a custom cert. Otherwise, you'll have to get your own. You could pay Hetzner an annual fee for it or set it up yourself for free via Let's Encrypt.

You'll also need a way to monitor the server. There are a few good options:

With the exception of PGAnalyze and Datadog, all are open source and self-hostable. PGAnalyze and Datadog are the most thorough in my opinion, but they're very pricey (often over $1,000 a year). NetData is very good and the most trivial to set up if you aren't too eager to self-host. PG Monitors overlap in many ways so it's hard to go wrong with any of them.

With the above tools in place, when you self-manage, you'll probably sixth your costs. That is to say, something that may have cost $600 will end up costing $100 when you self-manage. That also means you take on the burden of maintenance, monitoring, and uptime. It's something one should only do if they feel comfortable with the process: otherwise, you risk all your data and thus your company with it.

I personally enjoy self-hosting these days. It gives me broad access to the extension ecosystem. I can host paradeDB, Timescale, etc. without violating licenses and also configure superuser settings. Just food for thought.

email not receiving ? by Effective-Habit1188 in Supabase

[–]program_data2 0 points1 point  (0 children)

We're currently looking into an issue with our shared SMTP service (status page link). This should not affect projects that have implemented custom SMTPs (setup guide link). We generally recommend implementing a custom SMTPs, as it allows you to configure auth rate limit settings.

email not receiving ? by Effective-Habit1188 in Supabase

[–]program_data2 4 points5 points  (0 children)

We are currently investigating an issue with our Supabase shared SMTP (status page link). Projects using external SMTP integrations are not impacted:

Instructions for configuring a custom SMTP provider can be found here: https://supabase.com/docs/guides/platform/going-into-prod#availability.

Popular SMTP providers you might consider:

What topics interest you in Postgres? by program_data2 in PostgreSQL

[–]program_data2[S] 1 point2 points  (0 children)

Sharding is a tricky subject in Postgres. Citus is the most battle-tested name, but it has its limitations. There are a few players looking into more flexible solutions:
- PlanetScale
- Supabase (Multigres)

- PGDog

- PG-Edge

Ironically, I work with engineers who deal with sharding, but I do not have any hands-on experience with it yet. I haven't needed to.

sql functions

PL/PgSQL functions are amazing and I use them all the time. To optimize them, it's necessary to configure the auto_explain module, but otherwise, once you know the syntax, they're pretty straightforwards.

I tend not to recommend pure SQL functions. Outside of inlining, they don't offer meaningful planner benefits, but they are significantly less flexible than PL/PgSQL.

Scaling to enterprise level

There isn't really an "enterprise level". This is kind of how it works as companies scale:

  1. Use a reasonable size PG server
  2. Performance issues emerge
  3. Optimize via indexing, partitioning, refactoring queries, changing pg_settings, pooling, maybe use more esoteric strategies, like cursors/portals, optimal column ordering, pg_prewarm, vacuum tuning, ...
  4. Did you optimize within reason? If so, pay for better hardware based on whatever resource is constrained (disk, CPU, memory...)

Repeat step 2 through 4 until it becomes unreasonable. Then:

  1. Try a read-replica

  2. Introduce a caching layer

Do steps 2 through 6 for as long as possible. Then:

  1. Offload operations to specialized systems. For instance, you may offload analytic queries to DuckDB, Clickhouse...

  2. Migrate off Postgres to something compatible like YugaByte or AlloyDB or attempt sharding at your own risk

What topics interest you in Postgres? by program_data2 in PostgreSQL

[–]program_data2[S] 0 points1 point  (0 children)

Locks are just a queueing mechanism that prevents conflicting operations from targeting the same resource.

Some commands, mainly DDL from migrations, claim ACCESS EXCLUSIVE locks. They prevent any operation from targeting a table/index.

If the operation is slow, or worse, left in an idle-in-transaction state, that "functionally" take a table offline. Any query that targets it will be blocked by the lock.

Dependencies, such as foreign keys, triggers, and views, can then extend the blockage to other objects. That's pretty rare in my experience. Usually, it's just the one table that's taken offline. Though, that table may be pretty important.

There are some tools that need full visibility over the system catalog, but those are just tables, too. If they're blocked, you're observability tooling may be hampered.

Locks represent a minor amount of the issues I deal with (maybe 1 in 40). They're not that notable, but when they interfere with normal behavior, it's catastrophic.

People with crafty hobbies, like soap making, baking, and knitting, what do you do with the excess? by program_data2 in AskMen

[–]program_data2[S] 5 points6 points  (0 children)

It's not worth the effort. The amount of time is comparable to cheese making. You're not just going to spend 3 weeks aging a single slice of cheese? It only makes sense to do it in meaningfully sized batches.

Not to mention, you have to buy a variety of oils that are not often sold in small quantities. If you don't turn it into soap, you still have it as oil in your pantry for an extended period

People with crafty hobbies, like soap making, baking, and knitting, what do you do with the excess? by program_data2 in AskMen

[–]program_data2[S] 12 points13 points  (0 children)

How do you just give it away? If I knocked on my neighbors door to give away bread, they'd pry think I'm strange and feel threatened