RE: Failed transaction statistics to measure the logical replication progress

2021-12-04 Thread osumi.takami...@fujitsu.com
On Friday, December 3, 2021 3:12 PM vignesh C wrote: > Thanks for the updated patch. > Currently we are storing the commit count, error_count and abort_count for > each table of the table sync operation. If we have thousands of tables, we > will > be storing the information for each of the tables

Re: A test for replay of regression tests

2021-12-04 Thread Andrew Dunstan
On 12/3/21 23:21, Thomas Munro wrote: > > Next problem: The below is clearly not the right way to find the > pg_regress binary and bindir, and doesn't work on Windows or VPATH. > Any suggestions for how to do this? I feel like something like > $node->installed_command() or similar logic is need

Re: The "char" type versus non-ASCII characters

2021-12-04 Thread Tom Lane
Chapman Flack writes: > On 12/03/21 14:12, Tom Lane wrote: >> This reminds me of something I've been intending to bring up, which >> is that the "char" type is not very encoding-safe. charout() for >> example just regurgitates the single byte as-is. > I wonder if maybe what to do about that lies

Re: The "char" type versus non-ASCII characters

2021-12-04 Thread Chapman Flack
On 12/04/21 11:34, Tom Lane wrote: > Chapman Flack writes: >> "I am one byte of SQL_ASCII regardless of server setting". > > But it's not quite that. If we treated it as SQL_ASCII, we'd refuse > to convert it to some other encoding unless the value passes encoding > verification, which is exactl

Re: SPI TupTable memory context

2021-12-04 Thread Chapman Flack
On 12/03/21 20:22, Tom Lane wrote: > Seems kinda dangerous to me ... > >> AtEOSubXact_SPI can free tuptables retail, but only in the rollback case. > > ... precisely because of that. If you wanted to take control of > the TupTable, you'd really need to unhook it from the SPI context's > tuptable

Re: RecoveryInProgress() has critical side effects

2021-12-04 Thread Michael Paquier
On Tue, Nov 16, 2021 at 09:41:58AM -0500, Robert Haas wrote: > Maybe I'm not understanding you properly here, but it seems like you > might be forgetting that this is a local variable and thus every > backend is going to have something different. In the startup process, > it will be initialized by

Re: Remove extra Logging_collector check before calling SysLogger_Start()

2021-12-04 Thread Michael Paquier
On Fri, Dec 03, 2021 at 12:45:34PM -0500, Tom Lane wrote: > I think it's fine as-is; good belt-and-suspenders-too programming. > It's not like the extra check inside SysLogger_Start() is costly. +1. -- Michael signature.asc Description: PGP signature

Re: Do sys logger and stats collector need wait events WAIT_EVENT_SYSLOGGER_MAIN/_PGSTAT_MAIN?

2021-12-04 Thread Michael Paquier
On Fri, Dec 03, 2021 at 12:42:47PM -0500, Tom Lane wrote: > On the whole I'd be inclined to leave it alone. Even if the reporting > mechanisms aren't able to report these events today, maybe they'll > be able to do so in future. The context of the stats collector > process, in particular, seems l

Why doesn't pgstat_report_analyze() focus on not-all-visible-page dead tuple counts, specifically?

2021-12-04 Thread Peter Geoghegan
I wonder why we're counting the number of dead tuples (or LP_DEAD stub items) in the relation as a whole in ANALYZE's acquire_sample_rows() function. Wouldn't it make more sense to focus on the "live vs dead tuple properties" of heap pages that are not known to be all-visible when we generate stati