Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hPdk1-0005Y1-Es for pgsql-hackers@arkaria.postgresql.org; Sun, 12 May 2019 01:57:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hPdj1-0008Ad-E0 for pgsql-hackers@arkaria.postgresql.org; Sun, 12 May 2019 01:56:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hPdj0-0008AV-UL for pgsql-hackers@lists.postgresql.org; Sun, 12 May 2019 01:56:27 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hPdiw-00039y-MJ for pgsql-hackers@postgresql.org; Sun, 12 May 2019 01:56:24 +0000 Received: by mail-pf1-x442.google.com with SMTP id z28so5255116pfk.0 for ; Sat, 11 May 2019 18:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Z9QG/X2FVaUIjR5R2cU4HJBowCpokujtQ0uTkrHthNM=; b=H3Ya/pVg0c5WH3EVYJFX8Z3s87iVehbb+WQkoDjvuYXQ0m5tdZh78kZdwvxAuxDrfh r/2wiNFVzDc3AGTnq900ObS67r0xPageO34ZCjPhF0jOvjNdYUIO4qq5qiEdbuEhSYQh ucHyYp3dcIXTxZPS8pkIF1Y06J+bR+IRy+F2A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Z9QG/X2FVaUIjR5R2cU4HJBowCpokujtQ0uTkrHthNM=; b=Af0ojmJYAOcCI8hvAqXjuFCHGKHtqMXNWH8ZH912UM2o5rMoXCStqGvy/w/z2962pb 2lX+riYBilidutmMHxbS61Isx9hZ1jbyyJo5UC4SfuUtYpXuQoYc5O1SDQ4Tj0NpQwaB SJ+d99H4FpxWLFg83jH4F2PkoXVSvPzNvLlyDq7IeR2Oskb+lJWX+Ylqkvgb+3YivnqJ vVwNlBIruvdbWlCKq3t1qTTYfc45OkM8yObul8S3JSKjfsXs6s74PKgjqDzPReQyLWDC 5uXq3nubdE46kVpjxfiSHgjE/6l1AXADiMWW9GD+RJMn/ZkfpmwZTgXer4q5KuruDADw 9B7Q== X-Gm-Message-State: APjAAAVIMgxRj+STHrsfRHWKnxran4lbN4BKS3b2L7wjMh67H4CkO2+g i67FcqrS7W9o0SuIRmPdXhV1tg== X-Google-Smtp-Source: APXvYqzCsH+cYHaLgz6+qiXG/DGyaEMOy2W6BeQdjq6oMM4UdU0WZ8Gx3Fz7hsStnCT7z2NDB+ri7A== X-Received: by 2002:a63:7982:: with SMTP id u124mr23399580pgc.352.1557626178388; Sat, 11 May 2019 18:56:18 -0700 (PDT) Received: from rfd.leadboat.com (108-233-125-46.lightspeed.sntcca.sbcglobal.net. [108.233.125.46]) by smtp.gmail.com with ESMTPSA id t7sm17340007pfa.42.2019.05.11.18.56.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 May 2019 18:56:17 -0700 (PDT) Date: Sat, 11 May 2019 18:56:15 -0700 From: Noah Misch To: Andrew Dunstan Cc: Tom Lane , PostgreSQL Hackers Subject: Re: Augment every test postgresql.conf Message-ID: <20190512015615.GD1124997@rfd.leadboat.com> References: <20181229021950.GA3302966@rfd.leadboat.com> <20181230024014.GA181668@gust.leadboat.com> <16623.1546141591@sss.pgh.pa.us> <20181230055346.GB156585@gust.leadboat.com> <20190407064156.GC1914190@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Apr 07, 2019 at 07:56:02AM -0400, Andrew Dunstan wrote: > On Sun, Apr 7, 2019 at 2:41 AM Noah Misch wrote: > > > > On Sun, Dec 30, 2018 at 10:32:31AM -0500, Andrew Dunstan wrote: > > > On 12/30/18 12:53 AM, Noah Misch wrote: > > > > 2. stats_temp_directory is incompatible with TAP suites that start more than > > > > one node simultaneously. > > > > > The obvious quick fix would be to have PostgresNode.pm set this to the > > > default after inserting the TEMP_CONFIG file. > > > > I'd like to get $SUBJECT in place for variables other than > > stats_temp_directory, using your quick fix idea. Attached. When its time > > comes, your stats_temp_directory work can delete that section. > > Looks good. Pushed. This broke 010_dump_connstr.pl on bowerbird, introducing 'invalid byte sequence for encoding "UTF8"' errors. That's because log_connections renders this 010_dump_connstr.pl solution insufficient: # In a SQL_ASCII database, pgwin32_message_to_UTF16() needs to # interpret everything as UTF8. We're going to use byte sequences # that aren't valid UTF-8 strings, so that would fail. Use LATIN1, # which accepts any byte and has a conversion from each byte to UTF-8. $ENV{LC_ALL} = 'C'; $ENV{PGCLIENTENCODING} = 'LATIN1'; The log_connections message prints before CheckMyDatabase() calls pg_perm_setlocale() to activate that LATIN1 database encoding. Since bowerbird does a non-NLS build, GetMessageEncoding()==PG_SQL_ASCII at that time. Some options: 1. Make this one test explicitly set log_connections = off. This workaround restores what we had a day ago. 2. Move the log_connections message after CheckMyDatabase() calls pg_perm_setlocale(), so it gets regular post-startup encoding treatment. That fixes this particular test. It's still wrong when a database's name is not valid in that database's encoding. 3. If GetMessageEncoding()==PG_SQL_ASCII, make pgwin32_message_to_UTF16() assume the text is already UTF8, like it does when not in a transaction. If UTF8->UTF16 conversion fails, the caller will send untranslated bytes to write() or ReportEventA(). 4. If GetMessageEncoding()==PG_SQL_ASCII, make pgwin32_message_to_UTF16() return NULL. The caller will always send untranslated bytes to write() or ReportEventA(). This seems consistent with the SQL_ASCII concept and with pg_do_encoding_conversion()'s interpretation of SQL_ASCII. 5. When including a datname or rolname value in a message, hex-escape non-ASCII bytes. They are byte sequences, not text of known encoding. This preserves the most information, but it's overkill and ugly in the probably-common case of one encoding across all databases of a cluster. I'm inclined to do (1) in back branches and (4) in HEAD only. (If starting fresh today, I would store the encoding of each rolname and dbname or just use UTF8 for those particular fields.) Other preferences? Thanks, nm