[HACKERS] pg_basebackup behavior on non-existent slot - Mailing list pgsql-hackers

From Jeff Janes
Subject [HACKERS] pg_basebackup behavior on non-existent slot
Date
Msg-id CAMkU=1wSxYBNFY9TzuVh3=mDLr4BBsMct6wcViNMH+-6Xon4Uw@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] pg_basebackup behavior on non-existent slot
List pgsql-hackers

If I tell pg_basebackup to use a non-existent slot, it immediately reports an error.  And then it exits with an error, but only after streaming the entire database contents.

If you are doing this interactively and are on the ball, of course, you can hit ctrl-C when you see the error message.

I don't know if this is exactly a bug, but it seems rather unfortunate.

Should the parent process of pg_basebackup be made to respond to SIGCHLD?  Or call waitpid(bgchild, &status, WNOHANG) in some strategic loop?



$ /usr/local/pgsql9_6/bin/pg_basebackup -D data_replica -P --slot foobar -Xs

pg_basebackup: could not send replication command "START_REPLICATION": ERROR:  replication slot "foobar" does not exist
22384213/22384213 kB (100%), 1/1 tablespace
pg_basebackup: child process exited with error 1
pg_basebackup: removing data directory "data_replica"


Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: [HACKERS] WIP: long transactions on hot standby feedback replica/ proof of concept
Next
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] pgbench tap tests & minor fixes.