RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1292893 - psql creates XLOG, lock files unreadable by pg_basebackup
Summary: psql creates XLOG, lock files unreadable by pg_basebackup
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: resource-agents
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Oyvind Albrigtsen
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-18 16:21 UTC by Jeff Warnica
Modified: 2016-01-21 12:53 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-21 12:53:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jeff Warnica 2015-12-18 16:21:55 UTC
Description of problem:

When attempting to hot-add a new slave to a posgresql cluster, pg_basebackup will fail doing base sync from a remote node with either:

pg_basebackup: could not get transaction log end position from server: ERROR:  could not open file "./tmp/xlog_note.0": Permission denied

against another slave, or

pg_basebackup: could not get transaction log end position from server: ERROR:  could not open file "./tmp/PGSQL.lock": Permission denied

against the master.

Both of these files are root:root, 0640.

Granting this might not be the right way to sync up a new node, this seems an unreasonable restriction.

Comment 2 Oyvind Albrigtsen 2015-12-22 12:51:43 UTC
From the info I find you should stop the resource on the slave (e.g. standby the node) and run pg_basebackup on the slave node when postgresql isnt running on it.

When it isnt running the xlog and lock files are removed, which should solve the issue.

Comment 3 Jeff Warnica 2015-12-22 12:53:46 UTC
The xlog and lock files exist on the source of the backup, another slave or master, respectively. pg_basebackup runs against a running PG server.

Comment 4 Oyvind Albrigtsen 2015-12-22 13:25:54 UTC
It works fine for me when I run the following sequence:
# su - postgres -c "rm -rf /var/lib/pgsql/data/*"
# su - postgres -c "pg_basebackup -h 1.2.3.4 -U postgres -D /var/lib/pgsql/data -X stream -P"
# su - postgres -c "mkdir /var/lib/pgsql/pg_archive"

Comment 5 Oyvind Albrigtsen 2016-01-21 12:11:20 UTC
Did you get around to test by doing what I explained in the last comment?

Comment 6 Jeff Warnica 2016-01-21 12:52:19 UTC
Sorry. Yeah, please close as 1d10t


Note You need to log in before you can comment on or make changes to this bug.