Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFL2V-0003YL-5v for pgsql-committers@arkaria.postgresql.org; Mon, 07 Sep 2020 17:34:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kFL2U-00041d-2w for pgsql-committers@arkaria.postgresql.org; Mon, 07 Sep 2020 17:34:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFL2T-00041W-Tn for pgsql-committers@lists.postgresql.org; Mon, 07 Sep 2020 17:34:45 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kFL2P-0004KH-TJ for pgsql-committers@lists.postgresql.org; Mon, 07 Sep 2020 17:34:44 +0000 Received: by mail-qk1-x742.google.com with SMTP id w186so13207875qkd.1 for ; Mon, 07 Sep 2020 10:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=R8sZ6SXhU4O/Zk0C2Mz7Ghsdqdc16bqadGf/jjJouD0=; b=Sale+qi84cYxKIN7R0aLqiofSvpUYv0gM5fmGSrH/BlQmEf8+GHl5CypmrnzToWebD MO5sdhMaa/uoSf/ALFSg6WTy1ycyMoYJ0/HGpSV/yF2hqkq7cp642CsY9rM8Gw6qBNUy osv3j4tlCAFuDYrNUV7CNAme7eEnWSfdnr4kQGUp5tGie9nm/arwkoPoHpdiH2OyJxJc g0lRpMqUocCEAbgDUI8Yyibwbc6NOuWfLdLbxGHrnJJQNyB+bPZqy3q7t+iWJDshojqS WgTRgr6Wyb3AwKRQKoxHF6oKwEUSOXeRCOlP7k37yjTfkQcejZDmzwkJmNTFN9LcPH0n uC7A== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=R8sZ6SXhU4O/Zk0C2Mz7Ghsdqdc16bqadGf/jjJouD0=; b=dnZBsiV9XYPNEeqNYeQLT0JhRFITFLTpkWpKmBqef6Ke9yP9FmGe1tVnsnkrXZjEpC iOpGd8GSVVFnbzJUcnvHnasGNCKxfuwgd1M+TjrDkn68lx4/x5FVMGJdMmw7GaHYGJFg uOx2i8ndHJu8jfdwpmTXFoj6nrkH1VTnFw58Y4Wy+elfKzl5zAdTp+AxmOu4BrZCNhOy xFY4BP7ow6I9vI+BXvb/Sal5KAI5tByUsyzqisQWo4/JnzS0W9G/LMpqPdJQFqZwVbuM 0tv3EGaOniMfmZkgLq20tLYpnb6xe62WeTHRbdHJVPSAqk8Ag4U6ixYCygh7UepZS0IF 5sKQ== X-Gm-Message-State: AOAM5311jBuMlWcWWwqek09u5CDP+nRLBu9Ebt0z1fInAgFQhybAlTX9 2AhCadmC4nq3BO99BAdi/75gfQ== X-Google-Smtp-Source: ABdhPJy8tMjDHJK/05LFoKjbartjhdtvbvQ6sNYb8+09xXaoreT6I8r9X0phSsDmJKNeGmCTW4S8sQ== X-Received: by 2002:a05:620a:63a:: with SMTP id 26mr19544363qkv.68.1599500080785; Mon, 07 Sep 2020 10:34:40 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id q35sm12096842qtd.75.2020.09.07.10.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Sep 2020 10:34:40 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id A237E2A0FB5; Mon, 7 Sep 2020 14:34:38 -0300 (-03) Date: Mon, 7 Sep 2020 14:34:38 -0300 From: Alvaro Herrera To: Tom Lane Cc: Pavel Stehule , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based Message-ID: <20200907173438.GA10427@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1697751.1599498780@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Sep-07, Tom Lane wrote: > If there were something to be on the warpath about, it's that initdb > is pulling in such an obviously backend-only header as that. I wonder > if we should refactor to fix that. > > Quick experimentation says that the symbols initdb actually needs out > of that header are > > DEFAULT_MIN_WAL_SEGS > DEFAULT_MAX_WAL_SEGS > IsValidWalSegSize() Hmm, if we wanted to clean things up I think we should look at what other things from xlog_internal.h are being used by other frontend programs; for example it looks like fe_utils/archive.c is pulling xlog_internal.h just to get XLOGDIR, while pg_controldata needs just MAXFNAMELEN, XLogFileName and XLByteToSeg (apart from IsValidWalSegSize). Maybe there's room for a new header that serves the purpose of working with WAL segment files. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services