<p dir="auto">This is an attempt to <span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #1643.">fix</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1144793995" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/osm2pgsql/issues/1643" data-hovercard-type="issue" data-hovercard-url="/openstreetmap/osm2pgsql/issues/1643/hovercard" href="https://github.com/openstreetmap/osm2pgsql/issues/1643">#1643</a>. This updates osm2pgsql-replication to parse a conninfo string passed to the <code>-d</code> option when psycopg3 is used.  If pyscopg2 is installed on the system it fails in its current state. I glanced through the psycopg2 docs and do not see a similar functionality to what is available in the new version.  If this looks like a decent direction to head for this fix I can work on making this change not fail with psycopg2.</p>
<p dir="auto">This now works.</p>
<div class="snippet-clipboard-content position-relative overflow-auto" data-snippet-clipboard-copy-content="osm2pgsql-replication status -d postgresql://myuser:mypassword@myhost/pgosm
Using replication service 'http://download.geofabrik.de/north-america/us/district-of-columbia-updates', which is at sequence 3257 ( 2022-02-24T21:21:27Z )
Replication server's most recent data is 1 day(s) 2 hour(s) 8 minute(s) old
Local database is 29 sequences behind the server, i.e. 4 week(s) 0 day(s) 23 hour(s) 59 minute(s)
Local database's most recent data is 4 week(s) 2 day(s) 2 hour(s) 8 minute(s) old"><pre><code>osm2pgsql-replication status -d postgresql://myuser:mypassword@myhost/pgosm
Using replication service 'http://download.geofabrik.de/north-america/us/district-of-columbia-updates', which is at sequence 3257 ( 2022-02-24T21:21:27Z )
Replication server's most recent data is 1 day(s) 2 hour(s) 8 minute(s) old
Local database is 29 sequences behind the server, i.e. 4 week(s) 0 day(s) 23 hour(s) 59 minute(s)
Local database's most recent data is 4 week(s) 2 day(s) 2 hour(s) 8 minute(s) old
</code></pre></div>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/osm2pgsql/pull/1645'>https://github.com/openstreetmap/osm2pgsql/pull/1645</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/osm2pgsql/pull/1645/commits/5d8da40b3c09c18fdf165d0fb86341d004a09b82" class="commit-link">5d8da40</a>  Allow conninfo string with osm2pgsql-replication</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/osm2pgsql/pull/1645/files">1 file</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/osm2pgsql/pull/1645/files#diff-8cc67ac80c2424ed771d4b2afd70619beec7b2cb191693f980007cd98ac21933">scripts/osm2pgsql-replication</a>
    (29)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/osm2pgsql/pull/1645.patch'>https://github.com/openstreetmap/osm2pgsql/pull/1645.patch</a></li>
  <li><a href='https://github.com/openstreetmap/osm2pgsql/pull/1645.diff'>https://github.com/openstreetmap/osm2pgsql/pull/1645.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/pull/1645">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353U3YL47IXKXPE56DLTU5AGPVANCNFSM5PLRC7ZQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AA6353SMHNSII3UHZ6PNE5TU5AGPVA5CNFSM5PLRC7Z2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4RE2LZVQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/osm2pgsql/pull/1645</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/pull/1645",
"url": "https://github.com/openstreetmap/osm2pgsql/pull/1645",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>