Re-2: Need help migrating MSSQL2008R2 tables into PGSQL & make PGSQL mimic MSSQL behaviour.

2024-05-07 Thread Sacha Kerres
You can use this tool: https://www.sqlmanager.net/products/postgresql/datapump It allows easy migration..  Original Message processed by david® Re: Need help migrating MSSQL2008R2 tables into PGSQL & make PGSQL mimic MSSQL behaviour. 8. Mai 2024, 03:20 Uhr Von Greenhorn An

Re: Need help migrating MSSQL2008R2 tables into PGSQL & make PGSQL mimic MSSQL behaviour.

2024-05-07 Thread Greenhorn
How many tables do you have, and what are their sizes? I'm asking because if you're considering migrating to PostgreSQL, starting from scratch might be cleaner. This approach will also help you gain a deeper understanding of how data types are handled in PostgreSQL compared to MSSQL. On Wed, 8

Need help migrating MSSQL2008R2 tables into PGSQL & make PGSQL mimic MSSQL behaviour.

2024-05-07 Thread buggedme
I heard PGSQL can act like MSSQL behaviour so I'm trying to migrating tables to try it myself, but I really have hard time to migrating them. I already looked https://wiki.postgresql.org/wiki/Microsoft_SQL_Server_to_PostgreSQL_Migration_by_Ian_Harding but nothing is useful. For example,

Using GIN Index to see if a nested key exists in JSONB

2024-05-07 Thread Mike Jarmy
I have a table of semi-structured json that I am storing in a JSONB column with a GIN index: create table foo ( id text primary key, obj jsonb ); create index foo_obj on foo using gin (obj); I populated the table with 10,000 rows of randomly generated JSON objects, with

Re: Forcing INTERVAL days display, even if the interval is less than one day

2024-05-07 Thread Greg Sabino Mullane
Could just use a CASE for that particular case: CASE WHEN now()-latest_vacuum < '1 day' THEN '0 days ' ELSE '' END || DATE_TRUNC('second', now()-latest_vacuum) AS vacuumed_ago Cheers, Greg

Re: Question regarding how databases support atomicity

2024-05-07 Thread Adrian Klaver
On 5/7/24 9:48 AM, Siddharth Jain wrote: Thanks All for the kind responses. I understand how MVCC takes care of atomicity for updates to rows. I was developing a project where lets say data for each table is stored in its own folder together with metadata (we are not talking postgres now).

Re: Question regarding how databases support atomicity

2024-05-07 Thread Tom Lane
Siddharth Jain writes: > Thanks All for the kind responses. I understand how MVCC takes care of > atomicity for updates to rows. I was developing a project where lets say > data for each table is stored in its own folder together with metadata (we > are not talking postgres now). So if I have two

Re: Forcing INTERVAL days display, even if the interval is less than one day

2024-05-07 Thread Tom Lane
Ron Johnson writes: > PG 9.6.24, if relevant. (Hopefully we're migrating next month.) > Displaying how long ago a date was is easy, but interval casts "helpfully" > suppress "X days ago" if the interval is less than one day ago. > How do I make it display "days ago", even when days ago is zero?

Re: Question regarding how databases support atomicity

2024-05-07 Thread Siddharth Jain
Thanks All for the kind responses. I understand how MVCC takes care of atomicity for updates to rows. I was developing a project where lets say data for each table is stored in its own folder together with metadata (we are not talking postgres now). So if I have two tables A and B I have a folder

Re: Restore of a reference database kills the auto analyze processing.

2024-05-07 Thread Adrian Klaver
On 5/7/24 08:24, Adrian Klaver wrote: On 5/7/24 02:38, HORDER Philip wrote: Thanks for your time Adrian 1) What is the exact pg_restore command you are using? 2) From earlier post: '...  only analyzes tables in the new db at the point of reload, then shuts off again.' Provide that

Re: Restore of a reference database kills the auto analyze processing.

2024-05-07 Thread Adrian Klaver
On 5/7/24 02:38, HORDER Philip wrote: Thanks for your time Adrian Is there enough data processing? Yes, one table is receiving upwards of 20 million rows daily. We noticed the problem when fetch performance on this table degraded after updates. Autovacuum has thresholds for turning on,

Forcing INTERVAL days display, even if the interval is less than one day

2024-05-07 Thread Ron Johnson
PG 9.6.24, if relevant. (Hopefully we're migrating next month.) Displaying how long ago a date was is easy, but interval casts "helpfully" suppress "X days ago" if the interval is less than one day ago. How do I make it display "days ago", even when days ago is zero? Explicitly casting "day to

pg_basebackup "Permission denied" error when initiating streaming replication

2024-05-07 Thread Frans Simmelvuo (Papula-Nevinpat)
Hi, I'm trying to initiate streaming replication between two Postgres 10 servers on Windows. The source cluster is of size ~450gb, and the cluster consists of the primary data folder, and two separated tablespaces. One of the tablespaces is configured with a symbolic link inside Windows. Now,

RE: Restore of a reference database kills the auto analyze processing.

2024-05-07 Thread HORDER Philip
Thanks for your time Adrian > Is there enough data processing? Yes, one table is receiving upwards of 20 million rows daily. We noticed the problem when fetch performance on this table degraded after updates. > Autovacuum has thresholds for turning on, are you sure those thresholds are >

RE: Restore of a reference database kills the auto analyze processing.

2024-05-07 Thread HORDER Philip
Sorry, pg_dump. Phil Horder Database Mechanic -Original Message- From: Adrian Klaver Sent: 02 May 2024 17:59 To: HORDER Philip ; pgsql-general@lists.postgresql.org Subject: [EXTERNAL EMAIL] Re: Restore of a reference database kills the auto analyze processing. On 5/2/24 8:52 AM,