RE: Disable WAL logging to speed up data loading - Mailing list pgsql-hackers

From tsunakawa.takay@fujitsu.com
Subject RE: Disable WAL logging to speed up data loading
Date
Msg-id TYAPR01MB299092BD466BE142C84A92DBFEE70@TYAPR01MB2990.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Disable WAL logging to speed up data loading  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
From: Stephen Frost <sfrost@snowman.net>
> I'm not sure that I see this as really being much of an issue.  Perhaps there are
> some things we can do, as I mentioned before, to make it easier for users to
> have tables be created as unlogged from the start, or to be able to ALTER
> TABLE a bunch of tables at once (using all in tablespace, or maybe having an
> ALTER TABLE on a partitioned table cascade to the partitions), but overall the
> risk here seems very low- clearly whatever processing is running to load the
> data into a particular table knows what the table is and adding an ALTER
> TABLE into it would be trivial.

Thank you for your opinion.  I'm glad to see great people like Robert, Magnus and you have given comments (honestly, I
didn'texpect this trivial feature wouldn't get attention.)  I'll read those mails from the oldest including this, and
replyto them if needed. 


> > Likewise, can't we do ALTER TABLE SET UNLOGGED/LOGGED against a
> partitioned table?  Currently, the statement succeeds but none of the
> partitioned table nor its partitions is set unlogged (pg_class.relpersistence
> remains 'p').  Is this intended?  If it's a bug, I'm willing to fix it so that it reports
> an eror.  Of course, it's good to make all partitions unlogged at once.
>
> I agree that this doesn't seem quite right and considering the way other
> commands work like CREATE INDEX, I would think that doing such an ALTER
> TABLE would recurse to the individual partitions (skipping over any which are
> already set to the persistance desired..).

OK, I'll try to propagate the alteration to partitions.  (I wish the fix will be easy, but I'm afraid some devil is
lurking...) I'd appreciate it if someone could kindly point out the devil if he/she knows the past history. 


Regards
Takayuki Tsunakawa




pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Hybrid Hash/Nested Loop joins and caching results from subplans
Next
From: Amit Kapila
Date:
Subject: Re: logical streaming of xacts via test_decoding is broken