Re: Partitioning options

2024-02-08 Thread Jim Nasby
oning by date should greatly increase data locality. Also, when it comes to customer partitioning... really what you probably want there isn't partitioning but sharding. -- Jim Nasby, Data Architect, Austin TX

Re: Mimic ALIAS in Postgresql?

2024-01-22 Thread Jim Nasby
On 1/16/24 6:41 PM, Rob Sargent wrote: On 1/16/24 17:39, Jim Nasby wrote: On 1/16/24 4:57 PM, Rob Sargent wrote:     Or perhaps you have to beef the sed up to use word boundaries just     in case. I'm not a Java web developer... 😁 You need to adjust you glasses if that's what

Re: unbale to list schema

2024-01-22 Thread Jim Nasby
On 1/17/24 12:46 PM, Atul Kumar wrote: Hi, I am not able to find any solution to list all schemas in all databases at once, to check the structure of the whole cluster. Easiest way to do this is `pg_dumpall --schema-only`. -- Jim Nasby, Data Architect, Austin TX

Re: Moving to Postgresql database

2024-01-17 Thread Jim Nasby
ht get sent to the server. 1: https://babelfishpg.org/ -- Jim Nasby, Data Architect, Austin TX

Re: postgres sql assistance

2024-01-17 Thread Jim Nasby
as a dedicated loader, because there's no way to avoid the temp table (which a native loader doesn't need to use). -- Jim Nasby, Data Architect, Austin TX

Re: Parameter value in RDS

2024-01-16 Thread Jim Nasby
han one of the best ways to get documentation improved is for support to get tired of answering the same question over and over again ;p -- Jim Nasby, Data Architect, Austin TX

Re: Mimic ALIAS in Postgresql?

2024-01-16 Thread Jim Nasby
SQL access is via frameworks that all use their own language and come up with SQL based on that. How hard it'd be to bulk change the schema depends entirely on the framework. -- Jim Nasby, Data Architect, Austin TX

Re: Mimic ALIAS in Postgresql?

2024-01-16 Thread Jim Nasby
-incompatible) change to "sometable" you now at least have the option of creating a MTQRY.sometable *view* that hides whatever change you're making to MTUSER.sometable. In any case, yes, an updatable view would provide equivalent behavior in Postgres. -- Jim Nasby, Data Architect, Austin TX

Re: pg_dump Running Slow

2024-01-16 Thread Jim Nasby
ated. It's also a big advantage for cloud providers (as well as tools like PGO[4]): with many thousands of instances running regular backups it's harder for bugs to remain hidden. 1: https://www.postgresql.org/docs/current/continuous-archiving.html 2: https://pgbackrest.org/ 3: https:/

Re: postgres sql assistance

2024-01-16 Thread Jim Nasby
postgresql.org/docs/current/app-psql.html#APP-PSQL-META-COMMAND-ERRVERBOSE 2: https://www.postgresql.org/docs/current/plpgsql-control-structures.html#PLPGSQL-EXCEPTION-DIAGNOSTICS -- Jim Nasby, Data Architect, Austin TX

Re: data migration using EXTENSION tds_fdw

2024-01-16 Thread Jim Nasby
ar/char field in PG will give you an error (not sure what exact error you'd get though). -- Jim Nasby, Data Architect, Austin TX

Re: Add support for data change delta tables

2024-01-16 Thread Jim Nasby
o see done, but the base prerequisite for that is you have to communicate what you're actually looking for. -- Jim Nasby, Data Architect, Austin TX

Re: Why scan all columns when we select distinct c1?

2024-01-16 Thread Jim Nasby
s values that have been TOASTed. heap_deform_tuple() doesn't actually need to de-toast data, so it will simply return a Datum that is a "pointer" (not a C pointer) to the toasted data. That will only be detoasted if something actually needs the actual data. In some cases that be a big performance win. -- Jim Nasby, Data Architect, Austin TX

Re: How to redirect output from PostgreSQL pg_recvlogical to a file or a pipe?

2024-01-16 Thread Jim Nasby
ou can't simply pipe JSON into psql and expect anything useful to happen. Are you using jq to turn the JSON into actual SQL statements? What does some of your jq output look like? -- Jim Nasby, Data Architect, Austin TX

Re: What should I expect when creating many logical replication slots?

2024-01-16 Thread Jim Nasby
issue (though it IS an issue for MVCC / vacuuming!) - to test you need to have all the decoders that you expect to support. Ultimately, I'd be concerned with trying to support 100+ slots unless you know that your change rate isn't super high and that you don't have long-runnin

Re: Moving to Postgresql database

2024-01-16 Thread Jim Nasby
the actual performance issue here? I'm also wondering what the use case for constantly retrying errors is. -- Jim Nasby, Data Architect, Austin TX

Re: [EXTERNAL]Re: Refresh Materialized View Issue

2024-01-12 Thread Jim Nasby
/github.com/StarfishStorage/explain-running-query -- Jim Nasby, Data Architect, Austin TX

Re: Time zone offset in to_char()

2024-01-11 Thread Jim Nasby
On 1/11/24 6:20 PM, Jim Nasby wrote: On 1/11/24 5:53 PM, Tom Lane wrote: Adrian Klaver writes: test=# select to_char(now() AT TIME ZONE 'Europe/Amsterdam', '-MM-DD HH24:MI:SS.US0 TZH:TZM') ;     to_char    2024-01-12 00:

Re: Time zone offset in to_char()

2024-01-11 Thread Jim Nasby
HH24:MI:SS.US0 TZH:TZM') from tstz ; to_char -------- 2024-01-11 23:29:00.0493300 -06:00 (1 row) -- Jim Nasby, Data Architect, Austin TX

Re: Refresh Materialized View Issue

2024-01-11 Thread Jim Nasby
t know of any easy way to get the query plan for the REFRESH (it might be possible via gdb, but I'm not sure). We do at least know that the REFRESH is using parallel workers. Can you post the output of EXPLAIN ANALYZE for the SELECT? That might provide some clues. -- Jim Nasby, Data Architect, Austin TX

Re: Time zone offset in to_char()

2024-01-11 Thread Jim Nasby
2024-01-11 17:29:00.04933-06 (1 row) select timezone('UTC',tstz) from tstz ; timezone --- 2024-01-11 23:29:00.04933 (1 row) select tstz AT TIME ZONE 'UTC' from tstz ; timezone ------- 2024-01-11 23:29:00.04933 (1 row) -- Jim Nasby, Data Architect, Austin TX