REVIEW: Track TRUNCATE via pgstat - Mailing list pgsql-hackers

From Jim Nasby
Subject REVIEW: Track TRUNCATE via pgstat
Date
Msg-id 548F7D38.2000401@BlueTreble.com
Whole thread Raw
Responses Re: REVIEW: Track TRUNCATE via pgstat  (Alex Shulgin <ash@commandprompt.com>)
List pgsql-hackers
https://commitfest.postgresql.org/action/patch_view?id=1661 (apologies for not replying to the thread; I can't find it
inmy inbox) 

Patch applies and passes make check. Code formatting looks good.

The regression test partially tests this. It does not cover 2PC, nor does it test rolling back a subtransaction that
containsa truncate. The latter actually doesn't work correctly. 

The test also adds 2.5 seconds of forced pg_sleep. I think that's both bad and unnecessary. When I removed the sleeps I
stillsaw times of less than 0.1 seconds. Also, wait_for_trunc_test_stats() should display something if it times out;
otherwiseyou'll have a test failure and won't have any indication why. 

I've attached a patch that adds logging on timeout and contains a test case that demonstrates the rollback to savepoint
bug.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

Attachment

pgsql-hackers by date:

Previous
From: Jeff Janes
Date:
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Next
From: Michael Paquier
Date:
Subject: Re: pg_rewind in contrib