Re: pg_restore enhancements

2023-11-23 Thread Ron Johnson
Thanks for the explanation. On Thu, Nov 23, 2023 at 10:55 AM Tom Lane wrote: > Ron Johnson writes: > > On Thu, Nov 23, 2023 at 3:37 AM Laurenz Albe > > wrote: > >> You can avoidwriting WAL if you set "wal_level = minimal", restart > >> PostgreSQL > >> and restore the dump with the

Re: pg_restore enhancements

2023-11-23 Thread Tom Lane
Ron Johnson writes: > On Thu, Nov 23, 2023 at 3:37 AM Laurenz Albe > wrote: >> You can avoidwriting WAL if you set "wal_level = minimal", restart >> PostgreSQL >> and restore the dump with the --single-transaction option. > Why does "--single-transaction" prevent WAL writes? I'd expect _more_

Re: pg_restore enhancements

2023-11-23 Thread Ron Johnson
On Thu, Nov 23, 2023 at 3:37 AM Laurenz Albe wrote: [snip] > > You can avoidwriting WAL if you set "wal_level = minimal", restart > PostgreSQL > and restore the dump with the --single-transaction option. > Why does "--single-transaction" prevent WAL writes? I'd expect _more_ pg_wal growth from

Re: pg_restore enhancements

2023-11-23 Thread Laurenz Albe
On Wed, 2023-11-22 at 16:55 +, Efrain J. Berdecia wrote: > Thanks, the issue we've run into, which I guess could be really a setup > issue, with running a COPY command while executing pg_restore,  > is that if we are restoring a large table (bigger than 500GB) our WAL > directory can grow to

Re: pg_restore enhancements

2023-11-22 Thread Ron Johnson
On Wed, Nov 22, 2023 at 2:28 PM Tom Lane wrote: > "Efrain J. Berdecia" writes: > > Thanks, the issue we've run into, which I guess could be really a setup > issue, with running a COPY command while executing pg_restore, is that if > we are restoring a large table (bigger than 500GB) our WAL

Re: pg_restore enhancements

2023-11-22 Thread Tom Lane
"Efrain J. Berdecia" writes: > Thanks, the issue we've run into, which I guess could be really a setup > issue, with running a COPY command while executing pg_restore, is that if we > are restoring a large table (bigger than 500GB) our WAL directory can grow to > be very large. > I would think

Re: pg_restore enhancements

2023-11-22 Thread Efrain J. Berdecia
Thanks, the issue we've run into, which I guess could be really a setup issue, with running a COPY command while executing pg_restore, is that if we are restoring a large table (bigger than 500GB) our WAL directory can grow to be very large. I would think that if the pg_restore or COPY command

Re: pg_restore enhancements

2023-11-22 Thread Adrian Klaver
On 11/22/23 05:25, Efrain J. Berdecia wrote: After working for a site where we are constantly doing logical pg_dump to refresh environments I've come to miss features available in other RDBMS' refresh/restore utilities. Someone could point me in the right direction otherwise, but pg_restore

Re: pg_restore enhancements

2023-11-22 Thread Efrain J. Berdecia
Thanks, I'm trying to gage the interest on such a feature enhancement.  Up to now I have not actively contributed to the Postgres Project but this is itching my rusty programming fingers lol Thanks,Efrain J. Berdecia On Wednesday, November 22, 2023 at 08:28:18 AM EST, David G. Johnston

Re: pg_restore enhancements

2023-11-22 Thread David G. Johnston
On Wednesday, November 22, 2023, Efrain J. Berdecia wrote: > > Thanks in advance for any suggestions or the green light to post this to > the PG-developer group :-) > If you aren’t offering up a patch for these it isn’t developer material and belongs right here. David J.

pg_restore enhancements

2023-11-22 Thread Efrain J. Berdecia
After working for a site where we are constantly doing logical pg_dump to refresh environments I've come to miss features available in other RDBMS' refresh/restore utilities. Someone could point me in the right direction otherwise, but pg_restore seems to be lacking the ability to resume a