Re: libpq and multi-threading

2023-05-03 Thread Michael Loftis
That is not a thread. Linux man clone right at the start … “clone, __clone2, clone3 - create a child process” What you want is pthread_create (or similar) There’s a bunch of not well documented dragons if you’re trying to treat a child process as a thread. Use POSIX Threads, as pretty much anyti

Re: Backup schema without data

2023-04-06 Thread Michael Loftis
>From the man page…. “ -s --schema-only Dump only the object definitions (schema), not data. …..” On Thu, Apr 6, 2023 at 18:40 Atul Kumar wrote: > Hi, > > Please help me in telling that how I can take the backup of one single > schema without its data using pg_dump utility ? > > > So far, I

Re: postgres large database backup

2022-12-06 Thread Michael Loftis
On Thu, Dec 1, 2022 at 7:40 AM Vijaykumar Jain wrote: > > >> I do not recall zfs snapshots took anything resource intensive, and it was >> quick.ill ask around for actual time. > > > Ok just a small note, out ingestion pattern is write anywhere, read globally. > So we did stop ingestion while s

Re: postgres large database backup

2022-12-01 Thread Michael Loftis
On Thu, Dec 1, 2022 at 9:21 AM Michael Loftis wrote: > > > > On Thu, Dec 1, 2022 at 06:40 Mladen Gogala wrote: >> >> On 11/30/22 20:41, Michael Loftis wrote: >> >> >> ZFS snapshots don’t typically have much if any performance impact versus >>

Re: postgres large database backup

2022-12-01 Thread Michael Loftis
On Thu, Dec 1, 2022 at 06:40 Mladen Gogala wrote: > On 11/30/22 20:41, Michael Loftis wrote: > > > ZFS snapshots don’t typically have much if any performance impact versus > not having a snapshot (and already being on ZFS) because it’s already doing > COW style semantics. >

Re: postgres large database backup

2022-11-30 Thread Michael Loftis
On Wed, Nov 30, 2022 at 18:03 Mladen Gogala wrote: > On 11/30/22 18:19, Hannes Erven wrote: > > You could also use a filesystem that can do atomic snapshots - like ZFS. > > Uh, oh. Not so sure about that. Here is a page from the world of the big > O: https://blog.docbert.org/oracle-on-zfs/ > > Ho

Re: postgres large database backup

2022-11-30 Thread Michael Loftis
On Wed, Nov 30, 2022 at 8:40 AM Atul Kumar wrote: > > Hi, > > I have a 10TB database running on postgres 11 version running on centos 7 "on > premises", I need to schedule the backup of this database in a faster way. > > The scheduled backup will be used for PITR purposes. > > So please let me kn

Re: how to slow down parts of Pg

2020-04-21 Thread Michael Loftis
On Tue, Apr 21, 2020 at 15:05 Kevin Brannen wrote: > *From:* Michael Lewis > > > You say 12.2 is in testing but what are you using now? Have you tuned > configs much? Would you be able to implement partitioning such that your > deletes become truncates or simply a detaching of the old partition?

Re: how to slow down parts of Pg

2020-04-21 Thread Michael Loftis
drbdsetup allows you to control the sync rates. On Tue, Apr 21, 2020 at 14:30 Kevin Brannen wrote: > I have an unusual need: I need Pg to slow down. I know, we all want our > DB to go faster, but in this case it's speed is working against me in 1 > area. > > > > We have systems that are geo-red

Re: vacuum full doubled database size

2020-03-13 Thread Michael Loftis
A vacuum full rebuilds the tables, so yeah if it didn’t successfully complete I would expect a lot of dead data. On Fri, Mar 13, 2020 at 07:41 Zwettler Markus (OIZ) < markus.zwett...@zuerich.ch> wrote: > We did a "vacuum full" on a database which had been interrupted by a > network outage. > > >

Re: Extract transaction from WAL

2019-11-21 Thread Michael Loftis
On Thu, Nov 21, 2019 at 04:56 Jill Jade wrote: > Hello everyone, > > I am new to Postgres and I have a query. > > I have updated a table which I should not have. > > Is there a way to extract the transactions from the WAL and get back the > previous data? > > Is there a tool that can help to ge

Re: checkpoints taking much longer than expected

2019-06-16 Thread Michael Loftis
On Fri, Jun 14, 2019 at 08:02 Tiemen Ruiten wrote: > Hello, > > I setup a new 3-node cluster with the following specifications: > > 2x Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz (2*20 cores) > 128 GB RAM > 8x Crucial MX500 1TB SSD's > > FS is ZFS, the dataset with the PGDATA directory on it has th

Re: Starting Postgres when there is no disk space

2019-05-01 Thread Michael Loftis
Best optionCopy/move the entire pgdata to a larger space. It may also be enough to just move the WAL (leaving a symlink) freeing up the 623M but I doubt it since VACUUM FULL occurs in the same table space and can need an equal amount of space (130G) depending on how much it can actually free u

Re: Asynchronous Trigger?

2018-04-27 Thread Michael Loftis
As suggested, note in ToDo table, also maybe look at LISTEN and NOTIFY and have a job runner process LISTENing (and cleaning up the queue, or, marking an item as in progress if you've multiple workers) The work queue table is to help maintain state...if noone is LISTENing then the table acts as ba

Re: SSD filesystem aligned to DBMS

2018-01-16 Thread Michael Loftis
On Tue, Jan 16, 2018 at 08:02 Scott Marlowe wrote: > On Tue, Jan 16, 2018 at 7:47 AM, Neto pr wrote: > > Hi all > > > > Sorry, but I'm not sure that this doubt is appropriate for this list, > but I > > do need to prepare the file system of an SSD disk in a way that pointed > me > > to, which wou