Re: Template for schema? (as opposed to databases) - Mailing list pgsql-general

From Dominique Devienne
Subject Re: Template for schema? (as opposed to databases)
Date
Msg-id CAFCRh-8xr5r2K3ZO7Jz5a1EoZnxTv1OFCaZPRf_auvK7jbmZdw@mail.gmail.com
Whole thread Raw
In response to Re: Template for schema? (as opposed to databases)  (Francisco Olarte <folarte@peoplecall.com>)
List pgsql-general
On Tue, Jan 11, 2022 at 5:38 PM Francisco Olarte <folarte@peoplecall.com> wrote:
On Tue, 11 Jan 2022 at 17:10, Dominique Devienne <ddevienne@gmail.com> wrote:
...
> Creating the first two "fixed" schemas is fast enough. 300ms, including populating the 2nd with a bunch of rows.
> But creating the 3rd kind, which will be done many times, is not so fast, at 2.5 - 3s, which may seem fast,
> but when you do it dozens of time in unit-tests, adds up quickly to slow running tests...

First question would be, are you running a test server?

No. This is a "site" server, used by everyone. Devs and testers / users.
 
Are you testing crashes of just application logic?

Well, I try to write code that does not crash :)
But yes, it's testing results of running the code are as expected.
 
For these I normally use wal_level=minimal, fsync=off, same as for
full cluster restores ( it is faster to redo it if restore fails,
reinitdb on test cases ), it normally gives quite a nice performance boost.

I'm well versed in libpq, not so much in server admin.
The server is "remote" and "just runs", and I connect to it... --DD

pgsql-general by date:

Previous
From: Dominique Devienne
Date:
Subject: Re: Template for schema? (as opposed to databases)
Next
From: "David G. Johnston"
Date:
Subject: Re: Template for schema? (as opposed to databases)